Introduction to HTML
HTML Example
Example
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>php 中文网</title> </head> <body> <h1>我的第一个标题</h1> <p>我的第一个段落。</p> </body> </html>
Run Example»
Click the "Run Example" button to view Online example
Example analysis
- ##DOCTYPE declares the document type
- Located in the tags <html> and </html> describes the document type
- Located in the tags <body> and </body> is a visual web page Content
- is located in the tags <h1> and </h1> As a title use
- is located in the tags <p> and < /p> Displayed as a paragraph
#<!DOCTYPE html> also describes the document in HTML5 type. |
---|
Only <body> area (white part) will be displayed in the browser. |
---|
HTML versionSince the birth of the early Internet, many HTML versions have appeared:
Release time | |
---|---|
1991 | |
1993 | |
1995 | |
1997 | |
1999 | |
2000 | |
2012 | |
2013 |
<!DOCTYPE>The declaration helps browsers display web pages correctly.
There are many different files on the Internet. If the HTML version can be declared correctly, the browser can display the web page content correctly.
The doctype declaration is case-insensitive, and the following methods are available:
<!DOCTYPE html><!doctype html>
<!Doctype Html>
HTML5
<!DOCTYPE html>Currently in most browsers, directly outputting Chinese will cause Chinese garbled characters. At this time, we need to declare the characters as UTF- in the header. 8.
HTML Example<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>页面标题</title>
</head>
<body>
<h1>我的第一个标题</h1>
<p>我的第一个段落。</p>
</body>
</html>
Run Example»Click "Run Example" " button to view online examples