What is HTML?
HTML is a language used to describe web pages.
- HTML refers to Hypertext Markup Language: H yper T ext M arkup L anguage li>
- HTML is not a programming language, but a tag language
- The markup language is a set of markup tags (markup tag)
- HTML uses tag tags to describe a web page
- HTML documents contain HTML tags and text content
- HTML documents are also called web pages
A little HTML document:
<h1>My First Heading</h1>
<p>My first paragraph.</p>
- The DOCTYPE announcement characterizes the record type to be HTML
- The tags between <html> and </html> depicts a HTML document
- The tags between <head> and </head> gives data about the document
- The tags between <title> and </title> gives a title to the document
- The tags between <body> and </body> portrays the noticeable page content
- The tags between <h1> and </h1> portrays a heading
- The tags between <p> and </p> portrays a paragraph
"HTML tag" and "HTML element" usually describe the same thing.
But strictly speaking, an HTML element contains a start tag and an end tag, as in the following example:
- HTML labels ordinarily come in pairs like <p> and </p>
- The first tag in a couple is the begin tag, the second tag is the end tag
- The end tag is composed like the begin tag, however with a slash before the label name
Web BrowsersWeb browsers (such as Google Chrome, Internet Explorer, Firefox, Safari) are used to read HTML files and display them as web pages. Browsers do not display HTML tags directly, but you can use tags to decide how to present the contents of an HTML page to the user:
HTML Page Structure
The following is a visual HTML page structure:
The <!DOCTYPE> Declaration
The <!DOCTYPE> statement helps the web page display properly in the browser.
There are many different files on the web. If you can declare the HTML version correctly, the browser can display the content of the webpage correctly.
doctype declarations are not case sensitive and can be used in the following ways:
various adaptations of HTML:
|HTML||Initial release date 1991|
|HTML 2.0||Initial release date 1995|
|HTML 3.2||Initial release date 1997|
|HTML 4.01||Initial release date 1999|
|XHTML||Initial release date 2000|
|HTML5||Initial release date 2014|