HTML format tags how to use

Source: Internet
Author: User

1.<p></p>

2.<br/>

3.<blockquote></blockquote>

4.<dl></dl><dt></dt><dd></dd>

5.<ol></ol><ul></ul><li></li>

6.<div></div>

We talked about the basic tags of HTML documents in the previous tutorial, but we don't yet know how to display text in a browser, which is what we're going to talk about in tutorial two. Before we study, we must emphasize that our teaching

All of the format tags in the process are used for <body></body> label pairs.

1.<p></p>

<p></p> label pairs are used to create a paragraph in which the text added between the tabs will be displayed in the browser as a paragraph format. In addition, the,<p> tag can also use the Align property, which is used to illustrate alignment, and the syntax is: <p

Align= "" ></p>. The align can be any of the three values in left (right-aligned), Center (center), and Right (right-aligned). such as <p align= "center" ></p> means that the text in the label pair uses a centered alignment.

2.<br/>

<br/> is a very simple label, it has no end tag, because it is used to create a carriage return line, so I think you should use it. There are some tips on using <br/> If you add <br/> to the <p></p> tag

On the outside, a large carriage return line is created, that is, the distance between the line and line of the front and back text of the <br/> is relatively large, if placed inside the <p></p> <br> the distance between the lines of the front and back text will be smaller, you do not

Try to be a nuisance.

3.<blockquote></blockquote>

The text to be added between the <blockquote></blockquote> label pairs will be displayed in the browser by indenting both sides.

4.<dl></dl><dt></dt><dd></dd>

<dl></dl> used to create an ordinary list,<dt></dt> used to create the top-level items in the list,<dd></dd> used to create the lowest-level items in the list <dt ></dt> and <dd></dd> must be placed between <dl></dl> label pairs. Look at a

The example below will make you understand:

Example 2 Create a plain list

<title> a plain list </title>

<body text= "Blue" >

<dl>

<dt> China City </dt>

<dd> Beijing </dd>

<dd> Shanghai </dd>

<dd> Guangzhou </dd>

<dt> United States City </dt>

<dd> Washington </dd>

<dd> Chicago </dd>

<dd> New York </dd>

</dl>

</body>

This example appears in the browser as follows:

Chinese cities

Beijing

Shanghai

Guangzhou

American cities

Washington

Chicago

New york

5.<ol></ol><ul></ul><li></li>

<ol></ol> label pairs used to create a list marked with numbers;<ul></ul> label pairs used to create a list marked with Dots;<li></li> label pairs can only be <ol ></ol> or <ul></ul> label pairs, which are used to create a

List items, if the <li></li> is placed between <ol></ol> then each list item plus a number, if between <ul></ul> then each list item plus a dot. Take a look at the example below:

Example 3 A list marked with numbers or dots

<title></title>

<body text= "Blue" >

<ol>

<p> China City </p>

<li> Beijing </li>

<li> Shanghai </li>

<li> Guangzhou </li>

</ol>

<ul>

<p> United States City </p>

<li> Washington </li>

<li> Chicago </li>

<li> New York </li>

</ul>

</body>

This example appears in the browser as follows:

Chinese cities

Beijing

Shanghai

Guangzhou

• Cities in the United States

• Washington

• Chicago

• New York

6.<div></div>

<div></div> tags are used to format large chunks of HTML paragraphs, but also for formatting tables, this tag pair is very similar to the <p></p> tag pair, also has the align alignment attributes, the reader can try.

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.