Share an integration of HTML knowledge points

Y2J
Release: 2017-05-23 09:34:30
Original
1727 people have browsed it

The following editor will bring you a summary of front-end HTML knowledge points (recommended). The editor thinks it’s pretty good, so I’ll share it with you now and give it as a reference. Let’s follow the editor to take a look

1. Overview of html

htyper text markup language Hypertext Markup Language

Hypertext: It means that the page can contain pictures, links, and even non-text elements such as music and programs.

Markup language: A language composed of tags (tags).

Web page==HTML document, parsed by the browser, used for display

StaticWeb page: Static resources, such as xxx.html

Dynamic web page: The html code is dynamically generated by a certain development language based on user requests

The following For the tree structure diagram of the html file

The concept of tags:

• is wrapped by a pair of angle brackets For example: *Words in all tags cannot start with a number.

•Tags are not case-sensitive. and . It is recommended to use lowercase.

•The tag is divided into two parts: the start tag and the end tag . The part between the two tags is called the tag body.

•Some tag functions are relatively simple .Just use a tag. This kind of tag is called a self-closing sum tag. For example:


·tag Can be nested. But not cross-nested.

attribute of the tag:

•Usually appears in the form of key-value pairs. For example, name="alex"

•Attributes can only appear in the opening tag or self-closing tag.

•Attribute names are all lowercase. *Attribute values ​​must be wrapped in double quotes or single quotes, such as name="alex"

•If the attribute value is exactly the same as the attribute name, just write the attribute name directly. For example, readonly

2. headIntroduction to the main tags

##•The composition of the meta tag: the meta tag has two attributes. , they are http-equiv attribute and name attribute respectively. Different attributes have different parameter values. These different parameter values ​​realize different web page functions.


1 The name attribute is mainly used to describe web pages, and the corresponding attribute value is content. The content in content is mainly used to facilitate
search engine robots to find information and classify information.

<meta name="keywords"content="meta总结,html meta,meta属性,meta跳转">
<meta name="description"content="老男孩培训机构是由一个老的男孩创建的">
Copy after login

2 http-equiv, as the name suggests, is equivalent to the file header function of http. It can return some useful information to the browser to help display web page content correctly and accurately. The corresponding attribute value is content, the content in content is actually the variable value of each parameter.

<meta http-equiv="Refresh"content="2;URL=https://www.php.cn"> //(注意后面的引号,分别在秒数的前面和网址的后面)
<meta http-equiv="content-Type"content="text/html;charset=UTF8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>老男孩</title>
<link rel="icon" href="http://www.jd.com/favicon.ico">
Copy after login

3. Body tag

##Basic tag:

##: n The value range is 1~6; from large to small. Used to represent the title.

: Paragraph tag. The wrapped content is wrapped. There is also a line of blank space between the upper and lower content.

: Bold label.

: Add a center line to the text.

: The text becomes Italics.

and : superscript and subscript.



: line break.


: horizontal line

Block-level tags and inline tags

Block-level tags:

< ;ol>