Front-end development-from entry to abandonment-HTML02-Introduction

1. The meaning of each field in the HTML file

 

1. <! DOTYPE html> is a declaration document, here it is declared as an HTML5 document.

2. <html> is the root element of HTML, indicating that HTML content starts here.

3. <head> is the head element, which contains document (meta) data, and the content here will not be displayed directly on the web page.

4. The <title> element declares the document metadata: document title.

5. The <body> element declares that the HTML body content starts here

6. The <h1> element can define a large title, and h2-5 are respectively different levels of titles.

7. The <p> element declares a paragraph.

 

Second, what is HTML

 

1. HTML refers to Hyper Text Markup Language: Hyper Text Markup Language

2. HTML is not a programming language, but a markup language

3. Markup language is a set of markup tags (markup tag)

4. HTML uses markup tags to describe web pages

5. The HTML document contains HTML tags and text content

6. HTML documents are also called web pages

 

3. HTML tag

 

1. HTML tags are keywords surrounded by angle brackets, such as <html>

2. HTML tags usually appear in pairs, such as <b> and </ b>

3. The first tag in the tag pair is the start tag, and the second tag is the end tag

4. Start and end tags are also called open and closed tags <tag> and </ tag>

 

Four, HTML elements

"HTML tags" and "HTML elements" usually describe the same meaning;

But HTML elements contain start and end tags.

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

 

Five, WEB browser

 

Web browser (Chrome (Google browser), Firefox (Firefox browser), Internet Explorer (IE browser), Safari (mac operating system specific browser))

The browser does not display HTML tags directly, but you can use the tags to decide how to display the content of the HTML page to the user.

 

6. HTML web page structure

 

General HTML pages will have the following structure:

<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>

 

Note: The doctype declaration is case-insensitive, but capitalization is recommended.

 

7. General Declaration of HTML Recommendations

 

1.HTML5

<!DOCTYPE html>

 

2.HTML4.02

<!DOCTYPE HTML PUBLIC

"-//W3C//DTD HTML 4.01 Transitional//EN" "">

 

3.XHTML 1.0

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

"">

 

8. Chinese coding

 

Example: HTML sets utf-8 encoding

 

<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8">

<title> Declare UTF-8 encoding <\ title>

</head>

<body>

<h1>UTF-8</h1>

<p>utf-8</p>

<\body>

</html>

Guess you like

Origin www.cnblogs.com/chen1999/p/12755747.html