HTML foundation fifth lecture - Control form and its entry alignment http://www.wrclub.net/ 8/29/2002 Netmaster Club By default, the form is aligned on the browser screen, you You can specify the alignment of the table using the
Align property. The Align property can take the value "Left", "Center" and "Right". For example, let a form display in the center display You can use:
Note Be careful with the align property of
, not all browsers can identify it. If you want the form to display the center of the screen, use the
identifier to include a table more secure. You can use the Align property of the
to set the horizontal alignment of each row element in the table, which can also take the value "Left", "Center" and "Right". To set the vertical alignment of all elements in a certain row, you can use the value of the
, which can take the value "TOP", "Middle", and "Botton" (by default "middle"). To better control the arrangement of a header or element in the table, the value range of the
and
identifiers can be used, the value range of the two attributes is the same as
, however < TH>
Align and Valign properties will overwrite any arrangements for the entire row. The space of the control entry is set to the width of each column to the width of the longest entry in this column when the browser displays a table. The browser occupies the smaller screen space as much as possible to closely arrange each item in the table. You can change this default value using
Cellpadding and CellsPacing properties. By using the cellpadding property, you can arrange a larger space for each of the tables, use the CellsPacing property, and you can leave a certain space between the entry. The values of these two attributes are specified in pixels.
The following example illustrates how to use these two properties (see Figure 6.20):
cell spacing title> head>
Normal Table Caption>
First Column TD>
Second Column TD> TR> Table>
Table with Cell spacing caption>
First Column TD>
Second Column td> tr> table>
Table with cell padding caption>
First Column TD>
Second Column TD> TR> Table> body> html> Control Form and entry Some of the size you may want to make the table displayed, you can use the
width property to control the width of the table, you can provide the absolute value or relative value of the width for the width property. When providing the absolute value of the width for the width property, you are represented by pixels. For example, to establish a table with a width of 100 pixels, you can use
. Of course, it is not guaranteed that the table is displayed just that the width you specify, the content in the entry may force the table to display the value specified by the width property. Alternatively, you can also specify the width of the table with a relative value, for example, if you want the form to occupy the entire browser screen, you can use
i Have a blue background td> tr> table> center> body> html > When the text in this example is displayed on the browser, it is in a light blue box, which is useful for some specific texts in the main body text on the main page. For example, you can use this approach to highlight a reference, header, or a short comment on the webpage. You can also use the BGColor property for someone in a table in a table or even a group. For example, different colors can be used to distinguish data in the table. A more exciting place for the BGColor property may be to set the overall color of your web page. If you set the width of the table as the width of the screen, you can build a web page with multiple columns, and each column has different colors. The following example has established a web page with two columns: two color column title> head>
i Have A Olive Background td>
i Have A Aqua Background td> tr> table> center> body> html> Netscape and Microsoft's browser allow you to set background images for your form (see Figure 6.21), you can Specify an image by the TWo Color Column Title> head>
i Have a checkered background td> tr> table> center > Body> html> Netscape Navigator 4.0 and Internet Explorer 3.0 and 4.0 also allow you to use the Background property in a list of tables or an entries in the table, using different background images with different entries, you can Build a very visible web page. Table as a sheet
identifier was originally introduced to HTML to formatting information.