Control information on a Web page
<title> Page Title </title>
<body>
What the page displays
</body>
<!--Comment Content--Comments
Properties of the body:
BgColor page background color
Text text color (specify all text colors)
TopMargin on page margin
LeftMargin left page margin
RightMargin Right page margin
Bottomargin Next page margin
Background background Wallpaper
Note: background color and background wallpaper choose one
1.1, the general label 1.1.1, the Format control label
<font color= "" face= "" size= "" ></font> control font; color= "# #FF0000"; face, font, size, font.
<b></b> Font Bold
<i></i> Tilt
<u></u> Underline
<strong></strong> font Bold (emphasis, tone reinforcement)
<em></em> font Tilt (emphasis, tone enhancement)
<center></center> Center
Note:<center></center> the default before and after the other, the execution before and after the line, to ensure that itself is a whole, and then center display.
<br> or <br/> equivalent to carriage return (shortcut key: Shift + Enter)
indicates that spaces can also be pressed in the design page ctrl+shift+space
1.1.2, Content container label
Note:
<p></p> paragraph labels (blank lines between paragraphs)
Note:<p></p> before and after the other, the execution before and after the line, and empty open a line, to ensure that itself is a whole
<div></div> Layer Label (default line)
<span></span> Layer Labels (how much space is used by default)
<ol type= "1" >--sequential list with a serial number of ..., you can change the ordinal form in quotation marks
<li> content </li>
<li> content </li>
</ol>
Note: The default comes with serial number, self-wrapping, before and after the other, the execution before and after the line, and open a line, to ensure that itself is a whole
The above "ol" instead of "UL" is an unordered list, which does not have its own line-wrapping function.
1.2. Common label
Hyperlink label
<a href= "hyperlink address" target= "_blank" > Hyperlink text </a>--href (hyperlink reference); _blank is open in a new window.
The first step: do the anchor point label. <a name= "" ></a>
Step Two: do anchor links. <a href= "The value of the name of the target link" ></a>
Picture label
--high heel width set one, the display picture is scaled proportionally. ALT displays text when a picture cannot be loaded, and also helps search engines.
must appear alone.
1.3. Forms
<table></table> Forms
Width: wide. Can be expressed in pixels or percentages. Commonly used 960 pixels.
border: Border. Common value 0.
CellPadding: The margin between the content and the cell border. Common value 0.
cellspacing: The spacing between cells. Common value 0.
Align: Alignment.
bgcolor: Background color.
Background: Background image.
<tr></tr> Line
Align: horizontal alignment of the contents of a row
valign: Vertical alignment of the contents of a line
Height: Row Height
bgcolor: Background color
Background: Background image
<td></td> cell
<th></th> header, cell contents are automatically centered, bold
Align: How the contents of a cell are aligned
valign: Vertical alignment of the contents of a cell
Width: Cell width
Height: Cell Height
bgcolor: Background color
Background: Background image
The contents must be placed in the cell, the cell must be in the row, and the row must be placed in the table. When you set the row height and sizing of a cell, the corresponding row or column is affected at the same time
Cell Merging: (It is recommended to use table nesting as far as possible)
Colspan= "N"--merges the same row of cells (followed by the code to subtract the corresponding column)
Rowspan= "N"--merges the same column cell (minus the corresponding column starting from the second row)
Based on the above basic knowledge, the following gives the program code and running results
Program code:
View Code
Operation Result:
HTML Basics-General tags