HTML Document
An HTML document is a file written in hypertext markup language, and its file extension name is .html
or .xhtml
, such as example.html
.
An HTML document is a text document containing multiple tags that is read by a web browser and then displayed on the screen in a readable format.
See a sample of a simple HTML document written with Notepad:
The text of the above document looks like this in a web browser:
Web browser
- The purpose of the web browser (Chrome, Edge, Firefox, Safari) is to read and display the HTML documents correctly.
- A browser does not display HTML basic tags, but uses them to determine how the document should be displayed.
HTML document structure
The following is an idea of the HTML page structure mentioned above:
<html>
<head>
<title>Page title</title>
</head>
<body>
</body>
</html>
<h1>This is
my
heading</h1>
<p>This is
my
paragraph.</p>
<p>This is
my another
paragraph.</p>
Description of HTML page dtructure:
-
Content within the
<title>
element will be displayed in the title bar of the browser or in the Page tab. -
Content within the
<body>
section (the white area mentioned) will be displayed in the browser.