Chapter 02 - front end core technology - HTML typesetting
Learning objectives
Master the basic use of HTML tables
Master the technical {key points of HTML table typesetting
Master the technical {key points and difficulties of HTML overall page layout
Master the usage scenarios of HTML inline framework
Master the usage of HTML inline framework
HTML table
HTML table Tags
Label description < Table > Table < th > header cell of table < td > row of table < td > table cell < catpion > table title < thead > head area of table < tbody > middle body part of table < tFoot > bottom area of table
The following table is the structure diagram
Case 1
html <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>form</title> </head> <body> <table> <tr> <th>Row 1, column 1</th> <th>Row 1, column 2</th> <th>Row 1, column 3</th> </tr> <tr> <td>Row 2, column 1</td> <td>Row 2, column 2</td> <td>Row 2, column 3</td> </tr> </table> </body> </html>
Effect display:
attribute
Property value description alignleft |center| rightHTML5 is not supported. HTML 4.01 is obsolete. Specifies the alignment of the table with respect to the surrounding elements. bgcolorrgb(x,x,x) #xxxxxx color name HTML5 is not supported. HTML 4.01 is obsolete. Specifies the background color of the table. cellpadding pixel HTML5 is not supported. The space between the edge of the cell and its content. cellspacing pixels are not supported by HTML5. Space between cells. Width pixels | 100% HTML5 is not supported. The width of the table. Height pixels | 100% HTML5 is not supported. The height of the table is in border pixels. The default value of 1 specifies whether the table cell has a border.
Case 01
Effect display:
and | attribute
Property value description alignleft| right |centerHTML5 is not supported. Specifies the horizontal alignment of the cell contents. Bgcolorrgb (x, x, x) | #xxxxx | color name HTML5 is not supported. HTML 4.01 is obsolete. Specifies the background color of the cell. Height pixels | 100% HTML5 is not supported. HTML 4.01 is obsolete. Sets the height of the cell. valigntop| middle| bottom |baselineHTML5 is not supported. Specifies the vertical arrangement of cell contents. Width pixels | 100% HTML5 is not supported. HTML 4.01 is obsolete. Specifies the width of the cell. colspan number of columns specifies the number of columns a cell can span. Columnrowspan rows sets the number of rows a cell can span vertically. Row
Case 02: making a calculator
Calculator
Effect display: Case 03: making curriculum <head> <meta charset="UTF-8"> < title > course schedule < / Title > </head> <body> <table border="1" cellspacing="1" cellpadding="5"> < caption > course schedule < / caption > <tr bgcolor="aquamarine"> <th></th> < th > Monday < / th > < th > Tuesday < / th > < th > Wednesday < / th > < th > Thursday < / th > < th > Friday < / th > < th > Saturday < / th > < th > Sunday < / th > </tr> <tr> < TD rowspan = "3" bgcolor = "Antiquewhite" > morning</td> <td>PHP</td> <td>PHP</td> <td>PHP</td> <td>PHP</td> <td>PHP</td> < TD colSpan = "2" > self study</td> </tr> <tr> <td>JAVA</td> <td>JAVA</td> <td>JAVA</td> <td>JAVA</td> <td>JAVA</td> < TD colSpan = "2" > self study</td> </tr> <tr> <td>UI</td> <td>UI</td> <td>UI</td> <td>UI</td> <td>UI</td> < TD colSpan = "2" > self study</td> </tr> <tr> < TD rowspan = "4" bgcolor = "Beige" > afternoon</td> <td>PHP</td> <td>PHP</td> <td>PHP</td> <td>PHP</td> <td>PHP</td> < TD colSpan = "2" > self study</td> </tr> <tr> <td>JAVA</td> <td>JAVA</td> <td>JAVA</td> <td>JAVA</td> <td>JAVA</td> < TD colSpan = "2" > self study</td> </tr> <tr> <td>UI</td> <td>UI</td> <td>UI</td> <td>UI</td> <td>UI</td> < TD colSpan = "2" > self study</td> </tr> <tr> <td>Android</td> <td>Android</td> <td>Android</td> <td>Android</td> <td>Android</td> < TD colSpan = "2" > self study</td> </tr> </table> </body>Effect display: Case 04: beautiful form form
Effect display: Case 05: making a navigation bar Effect display: Case 06: realize graphic layout <td width="16%" colspan="3"> <img src="img/1-2.jpg" width="100%" /> </td> <td width="16%" colspan="3"> <img src="img/1-3.jpg" width="100%" /> </td> <td width="16%" colspan="3"> <img src="img/1-4.jpg" width="100%" /> </td> <td width="16%" colspan="3"> <img src="img/1-5.jpg" width="100%" /> </td> </tr> <tr align="center"> <td width="16%" colspan="3"> The reason is the country and according to Peng </td> <td width="16%" colspan="3"> The reason is the country and according to Peng </td> <td width="16%" colspan="3"> Time management is national and according to Peng </td> <td width="16%" colspan="3"> The reason is the country and according to Peng </td> <td width="16%" colspan="3"> The reason is the country and according to Peng </td> </tr> <tr align="center"> <td> <img src="img/189-eye.png" height="15" align="absmiddle" />123 </td> <td> <img src="img/188-target.png" height="15" align="absmiddle" />456 </td> <td> <img src="img/184-bar-chart.png" height="15" align="absmiddle" />789 </td> <td> <img src="img/189-eye.png" height="15" align="absmiddle" />123 </td> <td> <img src="img/188-target.png" height="15" align="absmiddle" />456 </td> <td> <img src="img/184-bar-chart.png" height="15" align="absmiddle" />789 </td> <td> <img src="img/189-eye.png" height="15" align="absmiddle" />123 </td> <td> <img src="img/188-target.png" height="15" align="absmiddle" />456 </td> <td> <img src="img/184-bar-chart.png" height="15" align="absmiddle" />789 </td> <td> <img src="img/189-eye.png" height="15" align="absmiddle" />123 </td> <td> <img src="img/188-target.png" height="15" align="absmiddle" />456 </td> <td> <img src="img/184-bar-chart.png" height="15" align="absmiddle" />789 </td> <td> <img src="img/189-eye.png" height="15" align="absmiddle" />123 </td> <td> <img src="img/188-target.png" height="15" align="absmiddle" />456 </td> <td> <img src="img/184-bar-chart.png" height="15" align="absmiddle" />789 </td> </tr> <tr height="40"></tr> <tr align="center"> <td width="16%" colspan="3"> <img src="img/2-1.jpg" width="100%" /> </td> <td width="16%" colspan="3"> <img src="img/2-2.jpg" width="100%" /> </td> <td width="16%" colspan="3"> <img src="img/2-3.jpg" width="100%" /> </td> <td width="16%" colspan="3"> <img src="img/2-4.jpg" width="100%" /> </td> <td width="16%" colspan="3"> <img src="img/2-5.jpg" width="100%" /> </td> </tr> <tr align="center"> <td width="16%" colspan="3"> The reason is the country and according to Peng </td> <td width="16%" colspan="3"> The reason is the country and according to Peng </td> <td width="16%" colspan="3"> Time management is national and according to Peng </td> <td width="16%" colspan="3"> The reason is the country and according to Peng </td> <td width="16%" colspan="3"> The reason is the country and according to Peng </td> </tr> <tr align="center"> <td> <img src="img/189-eye.png" height="15" align="absmiddle" />123 </td> <td> <img src="img/188-target.png" height="15" align="absmiddle" />456 </td> <td> <img src="img/184-bar-chart.png" height="15" align="absmiddle" />789 </td> <td> <img src="img/189-eye.png" height="15" align="absmiddle" />123 </td> <td> <img src="img/188-target.png" height="15" align="absmiddle" />456 </td> <td> <img src="img/184-bar-chart.png" height="15" align="absmiddle" />789 </td> <td> <img src="img/189-eye.png" height="15" align="absmiddle" />123 </td> <td> <img src="img/188-target.png" height="15" align="absmiddle" />456 </td> <td> <img src="img/184-bar-chart.png" height="15" align="absmiddle" />789 </td> <td> <img src="img/189-eye.png" height="15" align="absmiddle" />123 </td> <td> <img src="img/188-target.png" height="15" align="absmiddle" />456 </td> <td> <img src="img/184-bar-chart.png" height="15" align="absmiddle" />789 </td> <td> <img src="img/189-eye.png" height="15" align="absmiddle" />123 </td> <td> <img src="img/188-target.png" height="15" align="absmiddle" />456 </td> <td> <img src="img/184-bar-chart.png" height="15" align="absmiddle" />789 </td> </tr>
Effect display: HTML framework Effect display: Use iframe as the target of the link Note: since the target of the link matches the name of the iframe, the link opens in the iframe. design sketch:HTML list
|
---|