Basic html knowledge 2 (ordered unordered list, table), basic knowledge
Abstract: php basic knowledge 2 key points: ordered unordered list; <a> label; <table> label
Content container
1, Paragraph label
<P> </p>
Note:Execute a line feed before and after, and empty a line.
2, Ordered listOl (ordered list)And unordered listUl (unordered list)
Format:
<Ol type = "1">
<Li> today </li>
<Li> is </li>
<Li> OK </li>
</Ol>
Note:Both are automatically wrapped by default, and the subsequent content is automatically empty. The ordered list automatically carries the sequence number by default, and the list automatically does not contain the sequence number by default.
3,<A>Tag usage
(1) External links
Eg: <a href = "http://www.baidu.com.cn"> </a>
(2) anchor Link
Link to vertex:
<A href = "#"> link to the top </a>
Link to a place:
<A name = "aaa"> hahaha </a>
<A href = "# aaa"> link to hahaha </a>
Note:Name cannot start with a number.
(3) download
4Insert an image
Format:
Note: (1) Create Image links with nesting
<A href = "http://www.baidu.com.cn">
</A>
Effect: Click the image to jump to the Baidu page.
(2) The image will change proportionally. You can change the width and height to one. Note that the pixel unit is px.
(3) title attribute: picture is displayed when the image is moved.
(4) path:
Absolute path: file: // F |/2017-03-07boke.doc
Relative Path:./indicates the current directory eg:./4.png (the dot Slash can be omitted)
../Indicates the parent directory eg: ../picture/4.png
Note:/Represents the root of the website
5, Table (Table)
Format:
<Table border = "1" width = "30%">
<Tr>
<Th valign = "bottom" align = "right"> header (bottom right) 1 </th>
<Th> header 2 </th>
</Tr>
<Tr>
<Td width = "30%"> cell 1 </td>
<Td> Cell 2 </td>
</Tr>
<Tr>
<Td> cell 3 </td>
<Td> cell 4 </td>
</Tr>
</Table>
Note:
1. attributes:
(1) <table> </table> attributes:
Width: Expressed in pixels or percentages. Commonly used 960px.(The percentage is relative to the upper level, the first30%Is relativeBody, Second30%Is equivalentTr)
Border: Border. Commonly used 0
Cellpadding: the margin between the content and the cell border.
Cellspacing: the margin between cells.
Align: Align.
Bgcolor;
Background
(2) <tr> </tr> row <td> </td> column attribute
Align: horizontal alignment of a row.
Valign: vertical alignment.
Height
Width
Bgcolor
Background
(3) <th> </th> header. The content of the default cell is automatically centered and bold.
(4) <tfoot> </tfoot> no matter where the code is put, the display effect will be in the last line.
<Thead> </thead> no matter where the code is located, it will be displayed at the top, and thplus will do whatever it is, but the display effect is bold.
2. reason why the content is not top-notch
<Body> the margin attribute of a tag has a default value. You can set the value through align and cellpaddiing.
3. For examples of merging cells and nested cells, see 0308 table
Merge rows: Colspan = "n"
Merge columns: Rowspan = "n"
Reflections:
Be careful and summary in time.
Thanks for the red rose, thanks for the cake, and thanks for the day is a sunny day.