HTML

HyperText Markup Language

<!DOCTYPE html> <html> <body> <h1>My First Heading</h1> <p>My first paragraph.</p> </body> </html>

- The DOCTYPE declaration defines the document type
- 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

What is HTML?

- HTML stands for Hyper Text Markup Language
- HTML is a markup language
- A markup language is a set of markup tags
- The tags describe document content
- HTML documents contain HTML tags and plain text
- HTML documents are saved as .html files
- HTML documents can be created in any text editor
- HTML documents are also called web pages

HTML Tags

<tagname attribute="value">content</tagname>

- HTML tags are keywords (tag names) surrounded by angle brackets
- 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
- The end tag is written like the start tag, with a forward slash before the tag name
- Start and end tags are also called opening tags and closing tags

HTML Examples

<p>Paragraph Content</p>

Paragraph Content

<b>Bold Content</b> Bold Content <h1>A Header</h1>

A Header

<a href="href://google.com">A Link</a> A Link <ol> <li> Chicken </li> <li> Pizza </li> <li> Ice Cream </li> </ol>
  1. Chicken
  2. Pizza
  3. Ice Cream
<table> <tr> <td>1</td ><td>2</td> <td>3</td> </tr> <tr> <td>4</td> <td>5</td> <td>6</td> </tr> </table>
123
456
Some content courtesy of w3schools.com.