Research: xhtml documents with clear structures that comply with web standards

Source: Internet
Author: User
Tags object model

We support Web Standards, and think that the Document Object Model (DOM, Document Object Model) proposed by it is very reasonable, useful, and necessary, representing a trend and progress. The Document Object Model disconnects us from characters and operates documents in an advanced way at the structure level.
In terms of Web page creation (HTML/XHTML), following Web Standards can make the website structure more reasonable. However, new standards will always lead to rejection by some old web page producers, which is very simple because they cannot grasp new standards or at the same time they think they do not need new standards, the original method is enough. I will not discuss it with those who reject and resist it.
When standards were applied, some web page makers had entered some misunderstandings. The structure of documents is often confusing for a standard that is not good at and is insignificant. This clearly violates the original intention of Web Standards. The original intention of Web Standards is to let us organize documents in a clear structure to facilitate the use of DOM to operate documents.
For example, the layout of three columns (usually three div labels) during the webpage creation process. Many web page creators use the nesting of three div labels to achieve the goal, because if not nested, when the window is reduced, the div label will flow down.
They are like this:

The code is as follows: Copy code
<Div id = "column1">
<Div id = "column2">
<Div id = "column3">
</Div>
</Div>
</Div>

In terms of structure, content, and performance, these three columns are usually of equal status and should not be nested. Nesting implies their affiliated relationships. When we use xml parsing tools such as JDOM, DOM4j, or DOM JavaScript (ECMAScript) binding to parse these contents, we will encounter logical confusion.
Those who are biased against Web Standards may say that using table layout can easily achieve a good three-column layout. Let's look at the table code:

The code is as follows: Copy code
<Table>
<Tr>
<Td id = "column1"> </td>
<Td id = "column2"> </td>
<Td id = "column3"> </td>
</Tr>
</Table>

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.