Some misunderstandings in writing web pages with div structure by beginners

Source: Internet
Author: User
Keywords Misunderstanding

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

The creation of Web pages for the use of Div and CSS structure to write static page is now very mature, but many new entrants to the use of Div and CSS structure There are many misunderstandings, these myths are also I have experienced and be "old bird" point of correction, so summed up to share with you, I hope to write a page to help.

  

1, the use of div structure to make static HTML Web page is not tantamount to completely discard the old table. It is not recommended to use table to layout the page because the page loading is very slow to wait for the table structure load completed to see the Web page, followed by the layout of the table does not have a certain semantics, the code to modify the Web page more trouble.

When writing some column blocks, in particular, more data classification, such as "Buy Information" column block, the top may appear "publisher, release time, information title, contact" and other items, such as the local recommendations or to use a table to write, because the table is designed to write 6184.html "> The data table, easy to control, and meet the semantic requirements, as well as the page appears similar to the Excel data, but also suggest a table to write.

2, div structure is not equal to the entire area with div wrapped. Encounter a block with a div tag, so you write the code after the whole is Div, lost the semantic value of existence, block modification is not easy to find, reasonable use of DL, UL, OL, span, and other labels, not only to make your Web page looks clear, and modify it very convenient, see the name known, For example, you want to modify a news list, first find the news list of the div or DL tag, and then find the UL, modify the specific content is very easy.

3, not CSS files must be separated from the HTML code. CSS file and HTML is separated, because some CSS at the same time for multiple page services, while the user access CSS files can be slow to exist locally, so that the next time you visit other pages do not have to repeatedly load CSS, you can save time and traffic, improve access speed, But if your page has some areas of the CSS is unique, other pages can not be used, you do not have to peel out the CSS, directly with the style tag included in the HTML page.

4, with Div and CSS to write the page must be in different types and different versions of the browser to test. It is advisable to open multiple browsers at the same time. If you think your site visitors have not developed the habit of using Firefox, Google and other browsers, it must be compatible with IE6, 7, 8 versions, because of software limitations, there is no way to upload a different version of multiple browsers on a computer, so with the help of version simulation software, I often use ietest to test the Web page enough.

For less experienced page makers, it's best to write a small chunk and look at the effect in different browsers, if there is a problem can adjust the code in time, do not only in one browser test, in a breath, then when you are in the other browser test to find strange Web page when you are crazy (I have done this).

Summary of the main points for the time being so much, the rest is the ability to spell code, the proposed novice or do not use the code hint class software, it is best to write their own complete statement, when you write proficiency you will find that you write code faster than the code prompts faster.

Article source: Build Station Lake Http://www.sunfei.net (author: FEI)

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.