1400 Introduction to HyperText (Christian web host) Markup Language 4: Part
1400 Introduction to HyperText Markup Language 4: Part 2 Appendix J The border attribute lets you set the width of the table s border in pixels. If you want the border to be invisible, you can specify border=”0″. In the table shown in Fig. J.1, the value of the border attribute is set to 1. The width attribute sets the width of the table as either a number of pixels or a percentage of the screen width. Line 22
inserts a caption element into the table. The text inside the caption element is inserted directly above the table in most visual browsers. The caption text is also used to help textbased browsers interpret the table data. Tables can be split into distinct horizontal and vertical sections. The first of these sections, the head area, appears in lines 27 29
This is the head.
Put all header information (for example, the titles of the table and column headers) inside the thead element. The tr, or table row element, is used to create rows of table cells. All of the cells in a row belong in the
element, are suitable for column headings. The second grouping section, the tbodyelement, appears in lines 34 36
Like thead, the tbody element is used for formatting and grouping purposes. Although there is only one row and one cell (line 35) in the above example, most tables will use tbody to group the majority of their content in multiple rows and multiple cells. Look-and-Feel Observation J.1 Use tables in your HTML pages to mark up tabular data. Common Programming Error J.1 Forgetting to close any of the elements inside the table element is an error and can distort the table format. Be sure to check that every element is opened and closed in its proper place to make sure that the table is structured as intended. J.3 Intermediate HTML Tables and Formatting In the previous section and code example, we explored the structure of a basic table. In Fig. J.2, we extend our table example with more structural elements and attributes
We would like to recommend you tested and proved virtual web hosting services, which you will surely find to be of great quality.