Introduction to XHTML: how to create a web page for applying table labels in HTML/Xhtml

Source: Internet
Author: User
A table is an awkward label in XHTML. This section only describes how to use tables. Before CSS becomes popular, tables are widely used for positioning. In XHTML, table is not recommended for positioning. W3C hopes that CSS can replace & lt; table & gt; in positioning. But in fact, the use of CSS layout often requires a lot of hand-written code work (the commonly used Web Design Soft table is an awkward label in XHTML, this section only to understand.
Before CSS became popular, table was widely used in positioning. In XHTML, table is not recommended for locating. W3C hopes CSS can replace Position in positioning. But in fact, using CSS layout often requires a lot of hand-written code work (commonly used web design software such as Dreamweaver does not support p display perfectly ),
Many websites still use the homepage layout, for example, Google's More products page uses table to locate the problem. However, I personally recommend that you start to use CSS to locate Web pages, because this is the development direction of Web. Of course, replacing table with CSS in the early stage may cause a lot of trouble. Table label

In XHTML, the label for creating a table is
When writing code, we must first use Label the table into one row, and then use Corresponding to the following four rows. No There are two more
Tags divide each row into one grid. It is very difficult and inefficient to create a table with full handwriting code. In the web page creation software, creating a table is as simple as Word. You only need to select simple attributes such as columns and columns. However, we may encounter the possibility that the automatically created table does not meet the requirements and needs to be adjusted in code mode. Therefore, we still need to know the specific syntax of XHTML table labels. Border attribute of a table

Labels can have the border attribute. If you do not set the value of the border attribute, the browser will not display the border of the table by default. Table exerciseLet's create a label with four rows and two columns. The Code is as follows:

















A grid A grid
A grid A grid
A grid A grid
A grid A grid

The result is as follows: note that there are four pairs
Cell. Therefore, it becomes a table with four rows and two columns.
One grid, one grid, one grid
Such a table is sufficient to list information such as data, but the table to be located is usually more complex. Once again, we do not recommend using table for positioning, so here we just briefly introduce .

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.