HTML Tutorial
HTML XHTML
HTML Media
HTML Advanced
Now you can build a simple HTML page through an HTML example as follows, so as to have a simple understanding of the structure of HTML.
<!DOCTYPE html> <html> <head> <title>Page Title (iditect.com)</title> </head><body> <h1>i am the first title</h1> <p>I am the first paragraph.</p> </body> </html>
DOCTYPE
declares the type of the document<html>
The tag is the root element of the HTML page, and the closing tag of the tag is</html>
<head>
The tag contains the metadata of the document ( meta
), such as <meta charset="utf-8">
defining the web page encoding format as utf-8.<title>
The tag defines the title of the document<body>
The tag defines the main body of the document, that is, the content of the page visible to the web page, and the end of the tag is</body>
<h1>
The tag is used as a title, and the end of the tag is </h1>
, -- HTML title
<p>
The tag is displayed as a paragraph, and the tag ends with the </p>
--p tag usage
HTML language is used to describe web pages.
HTML markup tags are often referred to as HTML tags ( HTML tag ).
<html>
<b>
and</b>
<tag>content</tag>
"HTML tags" and "HTML elements" are often used to describe the same thing.
But strictly speaking, an HTML element contains a start tag and an end tag, as in the following example:
HTML element:
<p>This is a paragraph.</p>
Web browsers such as Google Chrome, Internet Explorer, Firefox, and Safari are used to read HTML files and display them as web pages.
Web browsers do not display HTML tags directly, but use tags to decide how to present the content of an HTML page to the user.
The following is a visual HTML page structure (only <body>
the content of the tags will be displayed in the browser):
<html> <head> <title>page title</title></head> <body> <h1>this is a title</h1> <p>This is a paragraph.</p> <p>This is another paragraph.</p> </body> </html>
Since the birth of the original unstandardized Hypertext Markup Language, HTML has been updated in several versions:
release time | Version |
---|---|
1989 | Tim Berners-Lee Invents the World Wide Web |
1991 | Tim Berners-Lee develops the HTML specification |
1993 | Dave Raggett developed HTML+ |
1995 | HTML Working Group defines HTML 2.0 |
1997 | W3C Recommendation: HTML 3.2 |
1999 | W3C Recommended Standard: html 4.01 |
2000 | W3C Recommendation: XHTML 1.0 |
2008 | WhatWG exposes HTML5 for the first time |
2012 | WHATWG develops HTML5 standard |
2014 | W3C Recommendation: HTML5 |
2016 | W3C Candidate Recommendation: HTML 5.1 |
2017 | W3C Recommendation: HTML5.1 Second Edition |
2017 | W3C Recommendation: HTML5.2 |
<!DOCTYPE>
is a standard Universal Markup Language doctype declaration that helps display web pages correctly in browsers.
 Due to the different types of files on the web, the HTML version needs to be declared correctly so that browsers can correctly recognize and display your web page content.
doctype
Declarations are case-insensitive and can be used in the following ways:
<!DOCTYPE html> <!DOCTYPE HTML> <!doctype html> <!Doctype Html>
<!DOCTYPE html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">