HTML knowledge point record, html knowledge point

Source: Internet
Author: User

HTML knowledge point record, html knowledge point

 

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

 

HTML basic <meta> tag

The meta tag describes some basic metadata.

1
2
3
4
5
6
7
8

 

Define keywords for search engines:
<Meta name = "keywords" content = "HTML, CSS, XML, XHTML, JavaScript">
Define the description for the webpage:
<Meta name = "description" content = "Free Web tutorials on HTML and CSS">
Author of the web page definition:
<Meta name = "author" content = "Hege Refsnes">
Refresh the current page every 30 seconds:
<Meta http-equiv = "refresh" content = "30">

Http-equiv attributes

 

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, as its name implies, is equivalent to an http File Header. It can return some useful information to the browser to help display the network correctly and accurately.
Page content.
The syntax of the http-equiv attribute of the meta tag is as follows: <meta http-equiv = "parameter" content = "parameter variable value">;
The http-equiv attribute has the following parameters:

A. Expires (TERM)
Note: You can set the expiration time of a webpage. Once the webpage expires, it must be re-transmitted to the server.
Usage: <meta http-equiv = "expires" content = "Fri, 12 Jan 2001 18:18:18 GMT">
Note: The GMT time format must be used.

B. Pragma (cache Mode)
Note: The browser is prohibited from accessing the page content from the cache of the local computer.
Usage: <meta http-equiv = "Pragma" content = "no-cache">
Note: in this way, visitors will not be able to browse offline.

C. Refresh (Refresh)
Note: automatically refresh and go to the new page.
Usage: <meta http-equiv = "Refresh" content = "2; URL">;
Note: 2 means that the URL is automatically refreshed after 2 seconds.

D. Set-Cookie (cookie setting)
Note: If the webpage expires, the cookie on the disk will be deleted.
Usage: <meta http-equiv = "Set-Cookie" content = "cookievalue = xxx; expires = Friday, 12-Jan-2001
18:18:18 GMT; path =/">
Note: The GMT time format must be used.

E. Window-target (display Window settings)
Note: The Force page is displayed on an independent page in the current window.
Usage: <meta http-equiv = "Window-target" content = "_ top">
Note: It is used to prevent others from calling their own pages in the framework.

F. content-Type (display character set setting)
Description: sets the character set used on the page.
Usage: <meta http-equiv = "content-Type" content = "text/html; charset = gb2312">

G. content-Language (set the Display Language)
Usage: <meta http-equiv = "Content-Language" content = "zh-cn"/>

 

<Map> label definition and usage

<Map> labels are used for client image ing. Image ing refers to an image with a clickable area.

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

Therefore, we should add the id and name attributes to <map> at the same time. The name attribute is required.

The area element is always nested inside the map element. The area element defines areas in image ing.

Instance:

1
2
3
4
5
6
7

 



<Map name = "planetmap">
<Area shape = "rect" coords = "0, 0, 82,126" href = "sun.htm" alt = "Sun">
<Area shape = "circle" coords = "90,58, 3" href = "mercur.htm" alt = "Mercury">
<Area shape = "circle" coords = "124,58, 8" href = "venus.htm" alt = "Venus">
</Map>

 

Coords attributes indicate coordinates

<Table> label

Cellspacing & cellpadding usage:

HTML Code

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

 

<Table border = "1" cellspacing = "10" cellpadding = "10">
<Tr>
<Th> Header 1 </th>
<Th> Header 2 </th>
</Tr>
<Tr>
<Td> row 1, cell 1 </td>
<Td> row 1, cell 2 </td>
</Tr>
<Tr>
<Td> row 2, cell 1 </td>
<Td> row 2, cell 2 </td>
</Tr>
</Table>

 

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

 

<Form>
First name: <input type = "text" name = "firstname"> <br>
Last name: <input type = "text" name = "lastname">
</Form>
<Hr/>
<Form>
Password: <input type = "password" name = "pwd">
</Form>
<Hr/>
<Form>
<Input type = "radio" name = "sex" value = "male"> Male <br>
<Input type = "radio" name = "sex" value = "female"> Female
</Form>
<Hr/>
<Form>
<Input type = "checkbox" name = "vehicle" value = "Bike"> I have a bike <br>
<Input type = "checkbox" name = "vehicle" value = "Car"> I have a car
</Form>
<Hr/>
<Form name = "input" action = "html_form_action.php" method = "get">
Username: <input type = "text" name = "user">
<Input type = "submit" value = "Submit">
</Form>

 

HTML character entity

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.