Html basic 2 important tags, html basic 2 tags
1. <div> label <div>... </Div> after the webpage creation process, some independent logic parts are divided into one<div>
In the tag, the <div> tag serves as a container. The logical part is a group of interrelated elements on the page. For example, an independent topic section in a webpage is a typical logical part.
<Div id = "Forum name">... </div> to make the logic clearer, we can set a name for this independent logic partid
Attribute<div>
Provide a unique name, just as the ID card number uniquely identifies and must be unique.
2. table labels
Four elements for creating a table: table, tbody, tr, th, and td
A. <table>... </Table>: the entire table<table>
Mark start,</table>
Mark end.
B. <tbody>... </Tbody>: when the table contains a large amount of content, the table will be downloaded and displayed a little bit. However, if the <tbody> label is added, the table will be displayed only after all the table content is downloaded. For example, the code in the code editor on the right.
C. <tr>... </Tr>: one row of the table. Therefore, there are several rows in the pair of tr tables.
D. <td>... </Td>: A table cell. A row contains several pairs.<td>...</td>
Which indicates that a row contains several columns.
E. <th>... </Th>: a cell in the table header,Table header.
F. The number of columns in the table depends on the number of data cells in a row.
<Table> <tbody> <tr> <th> class </th> <th> Number of Students </th> <th> average score </th> </tr> <tr> <td> Class 1 </td> <td> 30 </td> <td> 89 </td> </tr> <td> Class 2 </td>/ td> <td> 35 </td> <td> 85 </td> </tr> <td> Class 3 </td> <td> 32 </ td> <td> 80 </td> </tr> </tbody> </table>
View Code
Summary: no table lines are displayed in the browser before the css style is added to the table. Header, that is, the text in th is displayed in bold by default.
<style type="text/css">table tr td,th{border:1px solid #000;}</style>
Adding a summary to a table <table summary = "table introduction text"> the summary content is not displayed in the browser. It is used to increase the readability of the table.
Add a title description table to the table, which is displayed at the top of the table.
<Table> <caption> title text </caption> <tr> <td>... </Td> <td>... </Td>... </Tr>... </Table>