Don't worry if these examples use tags you have not learned.
You will learn about them in the next chapters.
All HTML documents must start with a document type declaration:
The HTML document itself begins with
<html> and ends with
The visible part of the HTML document is between
HTML headings are defined with the
<h1> defines the most important heading.
<h6> defines the least important heading:
HTML paragraphs are defined with the
HTML links are defined with the
The link's destination is specified in the
Attributes are used to provide additional information about HTML elements.
You will learn more about attributes in a later chapter.
HTML tags are element names surrounded by angle brackets:
<tagname>content goes here...</tagname>
Tip: The start tag is also called the opening tag, and the end tag the closing tag.
The purpose of a web browser (Chrome, IE, Firefox, Safari) is to read HTML documents and display them.
The browser does not display the HTML tags, but uses them to determine how to display the document:
Below is a visualization of an HTML page structure:
Note: Only the content inside the <body> section (the white area above) is displayed in a browser.
<!DOCTYPE> declaration represents the document type, and helps browsers to display web pages correctly.
It must only appear once, at the top of the page (before any HTML tags).
<!DOCTYPE> declaration is not case sensitive.
<!DOCTYPE> declaration for HTML5 is:
Since the early days of the web, there have been many versions of HTML: