4. Common HTML tags and usage

Source: Internet
Author: User

Page Structure label

Head Document Header Label

Title Display Document title

Body Document BODY Tag: All Web content should be placed inside the body tag

Example:

<title></title>

<body> </body>

The most serious: the relationship between labels--family relationship, parent-child relationship, peer relationship

Note: The structure label appears only once per page

2.

Block level Labels

Div tag: Exclusive line space.

Summary: div tag is the cleanest label example:<div> input text </div>

H1-h6 Title Word Tags:

1. Exclusive Line Space

2, the title Word has font size settings

3, the title Word has the font bold (highlighting) function

4, with the context of a large spacing example:

P Paragraph Tags:

1. Exclusive Line Space

2, with the context of a larger spacing example:<p> input paragraph </p>

UL Li unordered list label:

1, UL and Li all exclusive line of space

2, the UL label and the context has a greater spacing between

3, the Battle of the Father and son (ul Li must be used together)

4, Li Front has a modified point (list style)

5, Li has text indentation phenomenon

Example:<ul>

<li> Input Tags </li>

<li> Input Tags </li>

<li> Input Tags </li>

</ul>

DL DT DD definition list Label:

1, DL, DT and DD all have exclusive line space

2. There is a greater gap between the DL label and the context

3, go to the Father and son (DL DT DD together with or DL DT with or DL DD together)

4. There is text indent in front of DD

Cases:

<dl>

<dd><a href= "#" > Monitoring series </a></dd>

<dd><a href= "#" > Video series </a></dd>

<dd><a href= "#" > HDD series </a></dd>

<dd><a href= "#" > Video series </a></dd>

<dd><a href= "#" > Bracket Series </a></dd>

<dd><a href= "#" > Display series </a></dd>

</dl>

Or

<dl>

<dt><a href= "#" > Monitoring series </a></dt>

<dt><a href= "#" > Video series </a></dt>

<dt><a href= "#" > HDD series </a></dt>

<dt><a href= "#" > Video series </a></dt>

<dt><a href= "#" > Bracket Series </a></dt>

<dt><a href= "#" > Display series </a></dt>

</dl>

Or

<dl>

<dt><a href= "#" > Monitoring series </a></dt>

<dd><a href= "#" > Video series </a></dd>

<dd><a href= "#" > HDD series </a></dd>

<dd><a href= "#" > Video series </a></dd>

<dd><a href= "#" > Bracket Series </a></dd>

<dd><a href= "#" > Display series </a></dd>

</dl>

3.

Inline Tags :

A LINK tag:

1. href attribute decided to display as link style

2. The text color changes to Blue

3, the text appears the underline decoration

4, the mouse pointer will appear hand cursor style

Note: When the link address is unknown, write the "#" number in the value of the href corresponding

Deep Understanding:

Importance of relative relationships when linking (relative paths)

Make anchor tags (bookmarks):

Put bookmarks: <a id= "book signature" ></a> find bookmarks: <a href= "#书签名" ></a>

Span text content decoration Tags: cleanest label example:<span> modifier label </span>

Text-Decoration Tags:

B Bold Label (bold) I Tilt label (italic) strong bold label Em Tilt label

U underline label S strikethrough label SUP superscript label Sub subscript Word label

Cases:

<u> underline labels </u> <i> tilt labels </i> <strong> bold tags </strong> <em> tilt tags </em>

<b> Bold Label (bold) </b>

You can open Dreamweaver and enter a trial effect.

Note: If there is a space or carriage return after the inline label, a space position of "one English character" appears

Element (Single use)

BR NewLine Label: NOTE: Use only between inline tags

Input label

IMG image tags, inserting images

Detailed Explanation:

Where's the image? Use the SRC attribute to point to

Note: Before using the picture, copy the picture in the site site (root folder)

Web page Common diagram format: JPG gif png

Image Color mode can not be CMYK, with images folder to organize picture files

Special symbols:

1.&nbsp; Space symbol 2.&reg; registered trademark 3.&copy; copyright information

Attributes in HTML cannot be reused

Deep understanding of HTML tag relationships:

You typically include inline tags with block-level labels

Parent-Child Inheritance (note which attributes are not inherited and which can be inherited)

Child label attributes take precedence over parent (tag nearest principle)

4. Common HTML tags and usage

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.