The overall layout in Div+css layout optimization

Source: Internet
Author: User
Tags header

In Div+css layout, this is generally the case for the overall structure of the



and for the header section, certainly to display the site title, in addition to displaying the site title, you may want to show other important objects, such as the site's navigation bar:


 
这里是网站的标题

 
这里是网站导航栏

Many people generally write this, of course, there is no grammatical error. But there's a principle for div, that is to use as little as possible div nesting (and table-like disadvantages: 1, for users: the browser to consume resources to the nesting relationship analysis, affect the speed; 2, for search: Search engine on the nesting layer may have limitations). And the readability of this writing to us is not too high.

So how is the optimization, the most scientific way of writing it?

We use other XHTML code to replace the above Div, so how to choose??

First the choice of the title--we know that in XHTML the H1-h6 is the title, and the header title is the most important in the full page, we choose H1 to indicate that the title is natural.

Second navigation bar selection-navigation bar is composed of several small pieces of content, we choose unordered list

  • to show that the menu is the most suitable!

    Finally, the above content can be optimized into:


      
     

    这里是网站的标题


     

        
    • 这里是网站导航栏

    •   



Related Article

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.