© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2023
K. WilsonThe Absolute Beginner's Guide to HTML and CSShttps://doi.org/10.1007/978-1-4842-9250-1_2

2. Introduction to HTML

Kevin Wilson1  
(1)
WIDNES, UK
 

In this chapter, we’ll take a look at the basics of an HTML document.

The basic structure of an HTML document has three parts:
  • Document type declaration at the top

  • Document header

  • Body

Structure of an HTML Page

We can see in Figure 2-1 that an HTML page is a text file containing the elements and information the web browser uses to display the web page. Static web pages have the file extension .htm or more commonly .html.

An illustration of the H t m l structure. The first line reads, open-angle bracket exclamatory ...

Get The Absolute Beginner's Guide to HTML and CSS: A Step-by-Step Guide with Examples and Lab Exercises now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.