HTML learning (1) Introduction

HTML --- HyperText Markup Language, HTML is a standard for creating a web page markup language.

Note: For Chinese web pages need to use <meta charset = "utf-8 "> statement, otherwise it will be garbled. Some browsers (such as browser 360) is set as the default encoding GBK, then you need to set <meta charset = "gbk"> .

Extension: html or htm

Markup Language is not a programming language, is a set of markup tags , using HTML markup tags to describe web pages, HTML document (also called web pages ) contains the HTML tags and text content.

A simple HTML example:

< ! DOCTYPE HTML >   // declared as HTML5 document
< HTML >                      // <HTML> element is the root element of an HTML page
< Head >       // <head> element of the document contains the element (Meta) data, such as the <meta charset = "utf-8 "> custom page coding format UTF-. 8 .
<meta charset="utf-8">
< Title > newbie tutorial (runoob.com) </ title // <title> element describes the document title
</head>
< Body >       // <body> element contains the visible page content
< H1 > My first title </ h1 // <h1> element defines a headline
< The p- > my first paragraph. </ P // <P> element defines a paragraph
</body>
</html>
 

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
<Tag> SUMMARY </ tab>


HTML elements

"HTML tags" and "HTML elements" are often described the same meaning.

But strictly speaking, an HTML element contains the start tag and end tag, the following examples:

HTML elements:

<p> This is a paragraph. </ p>

Guess you like

Origin www.cnblogs.com/1016391912pm/p/11521017.html