NOTES ON HTML


1 HEADER AND STYLE

An HTML page is typically structured as:

<!DOCTYPE html>
 <html>
   <head>
     <title>Page Title</title>
     <meta charset="UTF-8">
     <meta name="Description of the file" 
           content="This field contains information about your page. 
                    It is usually around two sentences long.">.
     <meta name="author" content="Frédéric Galliano">
   </head>
   <body>
     CONTENT
   </body>
 </html> 

2 TEXT

2.1 Structure

  • Paragraphs are delineated by:

    <p>
      Lorem ipsum
    </p>
    
  • Headings are delineated by:

    <h1>Lorem ipsum</h1>
    

    and so on <h2>, <h3> up to 6, for subsections.

2.2 Highlighting

bold:
<b>
highlight:
<strong>
italic:
<i>
emphasize:
<em>
marked:
<mark>
small:
<small>
striked out
<strike>
underlined:
<u>
inserted:
<ins>
subscript:
<sub>
superscript:
<sup>

2.3 Hyperlink

<a href="https://link">Text </a>

2.4 Lists

  • Numbered lists:

    <ol>
      <li>Item 1</li>
      <li>Item 2</li>
    </ol>
    
  • Itemized lists:

    <ul>
      <li>Item 1</li>
      <li>Item 2</li>
    </ul>
    
  • Description lists:

    <dl>
      <dt>Tag 1</dt> <dd>Text 1</dd>
      <dt>Tag 2</dt> <dd>Text 2</dd>
    </dl>
    

2.5 Quoting

  • In line quoting: <quote>Lorem ipsum</quote>.
  • Block quote:

    <blockquote>
      Lorem ipsum
    </blockquote>
    

3 LAYOUT, IMAGES AND TABLES

3.1 Text subdivision

  • Horizontal line: <hr>.
  • Block of content:

    <div>
      Content
    </div>
    

3.2 Images

An image can be displayed as:

<img src="im.jpg" options>

where options can be width="24%, height="500px", etc.

3.3 Tables

<table>
  <tr>
    <td>Row 1 - Column 1</td>
    <td>Row 1 - Colunm 2 </td>
  </tr>
  <tr>
    <td>Row 2 - Column 1</td>
    <td>Row 2 - Column 2</td>
</tr>
</table>

Several tags are available:

table head:
<thead>
table body:
<tbody>
table foot:
<tfoot>
table header cells:
<th>

BACK

Author: F. Galliano
Last update: 05 janv. 2024