HTML Basic Examples
In this chapter, we will show some basic HTML examples.
Don’t worry if we use tags you haven’t learned about yet.
HTML Documents
All HTML documents must start with a document type declaration: <!DOCTYPE html>.
- The HTML document begins with
<html>and ends with</html>. - The visible part of the document is between
<body>and</body>.
Example:
<!DOCTYPE html>
<html>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>
## The `<!DOCTYPE>` Declaration
- The `<!DOCTYPE>` declaration defines the **document type**
- It helps browsers **display web pages correctly**
- It must appear **only once** at the **top of the page**
- It is **not case sensitive**