What is HTML?
HTML is a language for describing web pages.
- HTML stands for Hyper Text Markup Language
- HTML is not a programming language, it is a markup language
- A markup language is a set of markup tags
- HTML uses markup tags to describe web pages
HTML Tags
HTML markup tags are usually called HTML tags
- HTML tags are keywords surrounded by angle brackets like <html>
- HTML tags normally come in pairs like <b> and </b>
- The first tag in a pair is the start tag, the second tag is the end tag
- Start and end tags are also called opening tags and closing tags.
Example Explained
- The text between <html> and </html> describes the web page
- The text between <body> and </body> is the visible page content
- The text between <h1> and </h1> is displayed as a heading
- The text between <p> and </p> is displayed as a paragraph
HTML Headings
HTML headings are defined with the <h1> to <h6> tags.
HTML Paragraphs
HTML paragraphs are defined with the <p> tag.
HTML Links
HTML links are defined with the <a> tag.
HTML Images
HTML images are defined with the <img> tag.
Text Formatting Tags
| Tag | Description |
| <b> | Defines bold text |
| <big> | Defines big text |
| <em> | Defines emphasized text |
| <i> | Defines italic text |
| <small> | Defines small text |
| <strong> | Defines strong text |
| <sub> | Defines subscripted text |
| <sup> | Defines superscripted text |
| <ins> | Defines inserted text |
| <del> | Defines deleted text |
| <s> | Deprecated. Use <del> instead |
| <strike> | Deprecated. Use <del> instead |
| <u> | Deprecated. Use styles instead |
Tables
Tables are defined with the <table> tag. A table is divided into rows (with the <tr> tag), and each row is divided into data cells (with the <td> tag). The letters td stands for "table data," which is the content of a data cell. A data cell can contain text, images, lists, paragraphs, forms, horizontal rules, tables, etc.
<table border="1">
<tr>
<td>row 1, cell 1</td>
<td>row 1, cell 2</td>
</tr>
<tr>
<td>row 2, cell 1</td>
<td>row 2, cell 2</td>
</tr>
</table> |
How it looks in a browser:
| row 1, cell 1 | row 1, cell 2 |
| row 2, cell 1 | row 2, cell 2 |
Color Values
HTML colors are defined using a hexadecimal (hex) notation for the combination of Red, Green, and Blue color values (RGB). The lowest value that can be given to one of the light sources is 0 (hex 00). The highest value is 255 (hex FF).
Hex values are written as 3 double digit numbers, starting with a # sign.
| Color | Color HEX | Color RGB |
| | #000000 | rgb(0,0,0) |
| | #FF0000 | rgb(255,0,0) |
| | #00FF00 | rgb(0,255,0) |
| | #0000FF | rgb(0,0,255) |
| | #FFFF00 | rgb(255,255,0) |
| | #00FFFF | rgb(0,255,255) |
| | #FF00FF | rgb(255,0,255) |
| | #C0C0C0 | rgb(192,192,192) |
| | #FFFFFF | rgb(255,255,255) |
Sorted by Names
Link:
Same list sorted by values