<html> --Start tag
<head>
Control information on the web page
<title>Page Title</title>
</head>
<body>
What the page displays
</body>
</html> --end tag
<!--Comment content--> Comments
Properties of body:
bgcolor page background color
text text color (regulate all text colors)
topmargin Previous page margin
leftmargin left page margin
rightmargin right page margin
bottommargin Next page margin
background wallpaper
Note: Choose one of the background color and background wallpaper
1.1. General label 1.1.1. Format control label<font color= face= size=></font> Controls font; color=##FF0000; face, font; size, font size.
<b></b> font bold
<i></i> tilt
<u></u> Underline
<strong></strong> font bold (emphasized, strengthened tone)
<em></em> Font tilt (emphasis, use to enhance the tone)
<center></center> center
Note: If there are other lines before and after <center></center> by default, execute the line break before and after to ensure that it is a whole, and then display it in the center.
<br> or <br /> is equivalent to enter (shortcut key: shift + enter)
Indicates spaces, you can also press ctrl+shift+space on the design page.
1.1.2. Content container tags<h1></h1>…<h6></h6> Title (will automatically wrap). HTML titles (Heading) are defined by tags such as <h1> - <h6>.
Note: <h1></h1>…<h6></h6>The importance decreases in sequence, increasing or decreasing according to the existing default size. And if there are other things in front and back, execute the line break before and after, and open a line empty to ensure that it is a whole
<p></p> Paragraph label (blank lines between paragraphs)
Note: If there are other lines before and after <p></p>, execute the line break before and after, and open a line empty to ensure that it is a whole
<div></div> layer tag (by default, one line)
<span></span> layer tag (by default, how much space is occupied)
<ol type=1> --Sequential list, serial numbers are 1, 2, 3..., the serial number form can be changed in quotes
<li>Content</li>
<li>Content</li>
</ol>
Note: The default is to have a serial number and a new line. If there are other lines before and after, execute the new line before and after, and open one line empty to ensure that it is a whole.
If the above ol is changed to ul, it will be an unordered list, and it does not have the function of adding line breaks.
1.2. Commonly used tagsHyperlink tags
<a href=Hyperlink address target=_blank>Secret text of hyperlink</a> --href(hyperlink reference); _blank is open in a new window.
Step 1: Make anchor tags. <a name=></a>
Step 2: Make anchor links. <a href=value of name of target link></a>
Picture tags
<img src=image address alt=text width=height= /> --Set one high heel width, and the displayed picture will be scaled proportionally. alt displays text when the image cannot be loaded, and can also help search engines search.
<img /> Must appear separately.
1.3. Table<table></table> table
width:width. Can be expressed in pixels or percentages. Commonly used 960 pixels.
border: border. Commonly used value 0.
cellpadding: The margins between the content and the cell border. Commonly used value 0.
cellpacing: spacing between cells. Commonly used value 0.
align:Alignment.
bgcolor: Background color.
background: background image.
<tr></tr>
align: horizontal alignment of contents of a line
valign: Vertical alignment of contents of a line
height:
bgcolor: background color
background: background image
<td></td> Cell
<th></th> table header, the content of the cell is automatically centered and thickened
align: the alignment of the contents of the cell
valign: vertical alignment of the contents of the cell
width: cell width
height: cell height
bgcolor: background color
background: background image
The content must be placed in the cell, the cell must be placed in the row, and the row must be placed in the table. When setting the row height and column height of the cell, the corresponding row or column will also affect the
Cell merge: (It is recommended to use table nesting as much as possible)
colspan=n-Merge cells on the same row (write the code later to subtract the corresponding column)
rowspan=n-Merge the same column cells (subtract the corresponding column from the second row)
Based on the above basic knowledge, the program code and running results are given below
Program code: XML/HTML Code Copy content to clipboard