KKKKKKKK)
KKKKKKKK)
KKKKKKKK)
A Paragraph is a section of text, generally same rules apply as in books. However line breaks are more frequent in text on web pages, which increases readability when done right. Headings are also sections of text, though smaller then Paragraphs. Newspapers commonly use "headlines", they often appear as bold text in a larger size then the rest of the article. Paragraphs In theory you could just write plain text to the browser, but in practice you should markup text with p elements and other relevant elements, don't wrap text in div elements alone. The div element has no meaning, and is mainly used for styling purposes. Paragraphs are block elements, and can be placed inside other blocks, such as header, footer, div, and article. Etc. You can also place them directly in the body, which is what we will be doing in this Tutorial. Headings
Like we have headlines in books, newspapers, and magazines. Etc. We also got headlines on web pages. To create a headline, you should use the h1 to h6 elements. These elements are used to create a header level, where h1 has the highest level, h6 has the deepest level. The number of the header doesn't matter, if the header is used together with the section element, in which case the section element determines the section level. You can read more about this in the tutorial titled: Semantic elements of HTML Its important that you use headers correctly, to properly transfer "meaning" into your pages. The first header (h1), should be used for the main article header, where h2 can be used as subsections to h1, and h3 to h2. Etc. If you have navigation columns on your page, then its best to use h1 for the headers on those, rather then using h2. This is to properly indicate relasionship between your sections, the navigation section has nothing to do with the main article. A lot of web designers are using h2 for navigation columns, because they make the incorrect asumption, that you can't have multiple h1s on a page. Don't make the same mistake. \
HTML HOME HTML Introduction HTML Basic HTML Elements HTML Attributes HTML Headings HTML Paragraphs HTML Formatting HTML Editors HTML CSS HTML Links HTML Images HTML Tables HTML Lists HTML Blocks HTML Layout HTML Forms HTML Iframes HTML Colors HTML Colornames HTML Colorvalues HTML Quick List
HTML Advanced
HTML DOCTYPE HTML Head HTML Scripts HTML Entities HTML URLs
HTML Media
HTML Media HTML Object HTML Audio HTML Video HTML YouTube
HTML XHTML
XHTML Introduction XHTML Elements XHTML Attributes
HTML Examples
HTML Examples HTML Quiz HTML Certificate
HTML References
HTML Tag List HTML Attributes HTML Events HTML Colornames HTML Colorpicker HTML Character Sets HTML ASCII HTML ISO-8859-1 HTML Symbols HTML URL Encode HTML Lang Codes HTML Status Codes
HTML5
HTML5 Tutorial HTML5 Reference Chinese Version
HTML Tables
Previous Next Chapter
HTML Tables
Apples Bananas Oranges Other 44% 23% 13% 10%
HTML Tables
Tables are defined with the <table> tag. A table is divided into rows (with the <tr> tag), and each row is divided into data cells (with the <td> tag). td stands for "table data," and holds the content of a data cell. A <td> tag can contain text, links, images, lists, forms, other tables, etc.
Table Example
<table border="1"> <tr> <td>row 1, cell 1</td> <td>row 1, cell 2</td> </tr> <tr> <td>row 2, cell 1</td> <td>row 2, cell 2</td> </tr> </table>
All major browsers display the text in the <th> element as bold and centered.
<table border="1"> <tr> <th>Header 1</th> <th>Header 2</th> </tr> <tr> <td>row 1, cell 1</td> <td>row 1, cell 2</td> </tr> <tr> <td>row 2, cell 1</td> <td>row 2, cell 2</td> </tr> </table>
More Examples
Tables without borders How to create tables without borders. Table headers How to create table headers. Table with a caption How to add a caption to a table.
Table cells that span more than one row/column How to define table cells that span more than one row or one column. Tags inside a table How to display elements inside other elements. Cell padding How to use cellpadding to create more white space between the cell content and its borders. Cell spacing How to use cellspacing to increase the distance between the cells. The frame attribute How to use the "frame" attribute to control the borders around the table.
<caption> Defines a table caption <colgroup> Defines a group of columns in a table, for formatting <col /> <thead> <tbody> <tfoot> Defines attribute values for one or more columns in a table Groups the header content in a table Groups the body content in a table Groups the footer content in a table