SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Wizard silver trophybronze trophy
    Join Date
    Jul 2008
    Location
    New York, NY
    Posts
    1,432
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Global Naming Conventions

    e.g.
    Code HTML4Strict:
    <div id="news">
        <div class="section-main">...</div>
    </div>
     
    <div id="about">
        <div class="section-main">...</div>
    </div>
    Share your widely used naming conventions that keep your site structured...

  2. #2
    Resident curmudgeon bronze trophy gary.turner's Avatar
    Join Date
    Jan 2009
    Location
    Dallas
    Posts
    990
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just to hit on the obvious:

    The wrapper for the page that sets the overall dimensions, centers, etc., is called #wrapper.

    The one column that contains the meat of the page is #content.

    Across the top of the page (usually) is the #banner.

    The top level navigation menu is #globalnav.

    Sub-site or sectional navigation is #toc (for table of contents).

    The block, usually a column, that holds an olio of content is #sidebar. I'm not totally satisfied with that one.

    Then there are #footer, #notes, #biblio, and #abstract. Their usages should be obvious.

    cheers,

    gary
    Anyone can build a usable website. It takes a graphic
    designer to make it slow, confusing, and painful to use.

    Simple minded html & css demos and tutorials

  3. #3
    Follow: @AlexDawsonUK silver trophybronze trophy AlexDawson's Avatar
    Join Date
    Feb 2009
    Location
    England, UK
    Posts
    8,111
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    I usually place my elements in blocks of header, navigation / nav, content, footer (and if any DIV’s are required within those sections then I will name them appropriately based on their content) however the four I mentioned are the usual divider conventions I use as they are universally descriptive of most sites contained code.

  4. #4
    SitePoint Wizard silver trophybronze trophy
    Join Date
    Jul 2008
    Location
    New York, NY
    Posts
    1,432
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Besides using the main frame convention, what do you guys use as your inner convention?

    section, figure, article....

    Code HTML4Strict:
    <div id="about">
        <div class="section">...</div>
    </div>
     
    <div id="news">
        <div class="section">...</div>
    </div>
    And use the unique page identifier to style these differently if needed...

    Kind of like your own html frameworks


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •