First, examples:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Test</title> </head> <body> <h1>My Title</h1> <p>Hello World</p> </body> </html>
Second, what is HTML?
HTML is a language used to describe web pages.
- It refers to an HTML hypertext markup language ( H yper T EXT M arkup L anguage)
- HTML is not a programming language, but a markup language (markup language)
- Markup Language is a set of markup tags (markup tag)
- HTML uses markup tags to describe web pages
Three, HTML tags
Commonly referred to as HTML markup tags HTML tags (HTML tag).
- HTML tags by angle brackets enclosing keywords, such as <html>
- HTML tags are usually in pairs , such as <b> and </ b>
- The label on the label is the first start tag , the second tag is the end tag
- Start and end tags are also called opening tags and closing tags
Four, HTML page document =
- HTML documents describe web pages
- HTML documents contain HTML tags and plain text
- HTML documents are also called web pages
The role of the Web browser is to read HTML documents and display them in the form of a web page. The browser does not display the HTML tags, but uses the tags to interpret page content:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Test</title> </head> <body> <h1>My Title</h1> <p>Hello World</p> </body> </html>
Example explained
- <Html> text description of the page between the </ html>
- The text between the <body> and </ body> is the visible page content
- <H1> text between </ h1> is displayed as a title
- Text between <p> and </ p> is displayed as a paragraph