HTML

 

HTML Links - Syntax

In HTML, links are defined with the <a> tag:

<a href="url">link text</a>

 

Example:

<a href="https://www.w3schools.com/html/">Visit our HTML tutorial</a>

 

 

HTML Paragraphs

The HTML <p> element defines a paragraph:

 

Example:

<p>This is a paragraph.</p>

<p>This is another paragraph.</p>

 

 

HTML Images Syntax

In HTML, images are defined with the <img> tag.

The <img> tag is empty, it contains attributes only, and does not have a closing tag.

The src attribute specifies the URL (web address) of the image:

 

Example:

<img src="url of image">

 

The width and height Attributes

Images in HTML have a set of size attributes, which specifies the width and height of the image:

 

Example:

<img src="img_girl.jpg" width="500" height="600">

 

 

 

Defining an HTML Table

An HTML table is defined with the <table> tag.

Each table row is defined with the <tr> tag. A table header is defined with the <th> tag. By default, table headings are bold and centered. A table data/cell is defined with the <td> tag.

 

Example:

<table id="table1" style="width:100%">

  <tr>

    <th>Firstname</th>

    <th>Lastname</th>

    <th>Age</th>

  </tr>

  <tr>

    <td>Jill</td>

    <td>Smith</td>

    <td>50</td>

  </tr>

  <tr>

    <td>Eve</td>

    <td>Jackson</td>

    <td>94</td>

  </tr>

</table>

 

Unordered HTML List

An unordered list starts with the <ul> tag. Each list item starts with the <li> tag.

The list items will be marked with bullets (small black circles) by default:

 

Example:

<ul>

  <li>Coffee</li>

  <li>Tea</li>

  <li>Milk</li>

</ul>

 

 

Ordered HTML List

An ordered list starts with the <ol> tag. Each list item starts with the <li> tag.

The list items will be marked with numbers by default:

 

Example:

<ol>

  <li>Coffee</li>

  <li>Tea</li>

  <li>Milk</li>

</ol>

 

 

HTML Buttons

HTML buttons are defined with the <button> tag:

 

Example:

<button>Click me</button>