Iv. Common HTML Tags

Source: Internet
Author: User

    • 1, List related tags
<ul>: Define unordered list, only include <li> child elements
<ol>: Defines a sequence table that can contain only <li> sub-elements, because the label is ordered, and all of the tags have 2 properties, start and type.
Start: Specifies the starting number of the list item, which defaults to the first
Type: Specifies which type of number to use. 1, representing the use of numbers, a and a represent the use of letters, I and I represent the use of Roman numerals
<li>: Define list items.
<dl>: Definition list
<dt>: Defining title list items
<dd>: Defines a normal list item. It is important to note that this tag can put a lot of things, can contain and <div> completely similar content

The following is a copy of the HTML that contains each of the above tabs:
<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" >

    • 2, image-related tags
HTML provides used to define an image in a page, which can only be an empty element, and it cannot contain any content. Use this element to specify the following 2 contents, SRC and alt.
SRC: Used to specify where the picture is located, either as a relative path or as an absolute path
ALT: Used to specify a text that represents a hint for the picture.
In addition, you can specify height and width for this element, which can be used to represent heights and widths, either as percentages or as pixel values.
There are also 2 tabs, <map>: Used to define the image map, <area>: The internal area used to define the image map. Generally do not use, do not repeat it.

The following is a copy of the HTML that contains the above tag:
<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" >

    • 3, table-related labels
<table>: Define a table. This element can only contain 0 or 1 <caption>,0 or 1 <thead>,0 or 1 <tfoot&gt, multiple <tr&gt, multiple <tbody>.
In addition, it has the following properties:
Align: The table itself alignment, Left,right,center
bgcolor: background color of table
border: The width of the table border, which is an integer, 0 means that the table has no borders
cellpadding: Used to specify the spacing between cell contents and cell borders
cellspacing: Specify the spacing between cells
Width: Specify table widths
&LT;CAPTION&GT;: Defining table headings
<tr&gt: The row used to define the table can only contain <td> or <th>
<td>: Used to define cells
This label should say a few more words, often use the 2 attributes:
colspan: Used to specify how many columns the cell spans
RowSpan: Used to specify how many rows the cell can span
&LT;TH&GT: The cell used to define the header of a table, which is basically the same as <td> usage
<tbody&gt: The main body of the table can only contain <tr>
<thead&gt: Table header, similar to <tbody> usage
<tfoot&gt: Table footer, similar to <tbody> usage

The following is a copy of the HTML that contains the above label:
<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" >
    • 4, frame-related labels
By using the framework, you can divide your browser into several different parts and then display different XHTML pages in the same browser window.
If you want to use the framework in HTML, you should use the frameset DTD in the HTML page, and the <frameset>: Define a frameset to contain other frames
<frame>: Used to define a frame in a frameset, which is an empty element. The SRC attribute specifies that the page be loaded.
<iframe>: Generates an inline frame that can be placed anywhere on an HTML page.
For these related tags of the framework, it is worth noting that the frames are not used too much in the frameset page, which is very performance-consuming.
The following is an HTML page that contains the above tags:
<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" >

<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" >


Iv. Common HTML Tags

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.