Tags, attributes, tables, lists, links, images, and CSS basics
HTML (HyperText Markup Language) is the standard language to create web pages using tags enclosed in < > brackets.
HyperText = text with links | Markup Language = uses tags to define structure
<html> → root tag
<head> → metadata: <title>Page Title</title>
<body bgcolor="white" text="black"> → visible content
| Tag | Purpose | Key Attributes |
|---|---|---|
| <h1>–<h6> | Headings (h1=largest) | align |
| <p> | Paragraph | align |
| <br> | Line break (self-closing) | — |
| <hr> | Horizontal line | size, width, color |
| <b>, <i>, <u> | Bold, Italic, Underline | — |
| <font> | Text formatting | size (1-7), color, face |
| <a> | Hyperlink | href, target |
| <img> | Image | src, alt, width, height |
| <ul>/<ol>/<li> | Lists | type, start |
| <table> | Table | border, width, cellpadding |
| <tr>/<td>/<th> | Row / Cell / Header cell | colspan, rowspan, bgcolor |
<a href="https://google.com" target="_blank">Google</a>
<img src="photo.jpg" alt="Photo" width="200">
CSS inline: <p style="color:red;">Red text</p>