Home  >  Article  >  Web Front-end  >  HTML knowledge point record_html/css_WEB-ITnose

HTML knowledge point record_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:46:391084browse

Keywords: meta; http-equiv; map; table; form; character entity

HTML basics

tag

meta tag describes some basic metadata.

1
2
3
4
5
6
7
8

 

为搜索引擎定义关键词:
      
为网页定义描述内容:
      
定义网页作者:
      
每30秒中刷新当前页面:
      

1
2
3
4
5
6
78

Define keywords for search engines:
      

http-equiv attribute

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37

 

http-equiv顾名思义,相当于http的文件头作用,它可以向浏览器传回一些有用的信息,以帮助正确和精确地显示网
页内容。
meta标签的http-equiv属性语法格式是: ;
其中http-equiv属性主要有以下几种参数:

A、Expires(期限)
说明:可以用于设定网页的到期时间。一旦网页过期,必须到服务器上重新传输。
用法:
注意:必须使用GMT的时间格式。

B、Pragma(cache模式)
说明:禁止浏览器从本地计算机的缓存中访问页面内容。
用法:
注意:这样设定,访问者将无法脱机浏览。

C、Refresh(刷新)
说明:自动刷新并转到新页面。
用法:
注意:其中的2是指停留2秒钟后自动刷新到URL网址。

D、Set-Cookie(cookie设定)
说明:如果网页过期,那么存盘的cookie将被删除。
用法:
注意:必须使用GMT的时间格式。

E、Window-target(显示窗口的设定)
说明:强制页面在当前窗口以独立页面显示。
用法:
注意:用来防止别人在框架里调用自己的页面。

F、content-Type(显示字符集的设定)
说明:设定页面使用的字符集。
用法:

G、content-Language(显示语言的设定)
用法:

1
2
3
4
5
6
7
8
9
1011
12
13
14
15
16
17
18
19
2021
22
23
24
25
26
27
28
29
3031
32
33
34
35
36
37
td> http-equiv, as the name suggests, is equivalent to the file header of http. It can return some useful information to the browser to help display the web content correctly and accurately.
The syntax format of the http-equiv attribute of the meta tag is: ;
The http-equiv attribute mainly has the following parameters :

A. Expires (period)
Description: Can be used to set the expiration time of the web page. Once a web page expires, it must be retransmitted to the server.
Usage:
Note: The GMT time format must be used.

B. Pragma (cache mode)
Description: Prohibit the browser from accessing page content from the cache of the local computer.
Usage:
Note: With this setting, visitors will not be able to browse offline.

C. Refresh
Description: Automatically refresh and go to a new page.
Usage: ;
Note: The 2 refers to automatically refreshing to the URL after staying for 2 seconds.

D. Set-Cookie (cookie setting)
Note: If the web page expires, the saved cookies will be deleted.
Usage:Note: GMT time format must be used.

E. Window-target (setting of display window)
Description: Force the page to be displayed as an independent page in the current window.
Usage:
Note: Used to prevent others from calling your own page in the frame.

F. content-Type (display character set setting)
Description: Set the character set used by the page.
Usage:

G, content-Language (display language setting )
Usage:

tag

Tag definition and usage instructions

tag is used for client-side image mapping. An image map is an image with clickable areas.

The usemap attribute in can reference the id or name attribute in (depending on the browser)

So we should add both id and name attribute. The name attribute is required.

area elements are always nested inside map elements. The area element defines an area in the image map.

Example:

1
2
3
4
5
6
7

 

Planets

 
   Sun
   Mercury
   Venus
 
 

1
2
3
4
5
6
7

 Planets


Sun
Mercury
Venus

Coords attribute represents coordinates

tag

Cellspacing&cellpadding usage:

1
2
3
4
5
6
7
8
9
10
11
12
13
14

 


 
 
 
 
 
 
 
 
 
 
 
 
 
Header 1Header 2
row 1, cell 1row 1, cell 2
row 2, cell 1row 2, cell 2
 

HTML Code

1
2
3
4
5
6
7
8
9
10
11
12
13
14



< th>Header 1










Header 2
row 1, cell 1 row 1, cell 2
row 2 , cell 1 row 2, cell 2

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

 


 First name: 

 Last name: 
 
 
 

 

 Password: 
 
 
 

 

 Male

 Female
 
 
 

 

 I have a bike

 I have a car 
 
 
 

 

 Username: 
 
 
 

HTML form and input HTML Code 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

First name:

Last name:




Password:




Male

Female




I have a bike

I have a car




Username:

HTML character entity

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn