Results 1 to 2 of 2

Thread: CSS and HTML question

  1. #1
    Join Date
    Oct 2009
    Posts
    28

    CSS and HTML question

    Hello,

    I have a kind of stupid general css/html question, and I'm sure it's a matter of preference...but I'd like to hear other's opinion...

    I am creating part of a webpage that has 3 div sections sitting side-by-side. Each section will look exactly the same with the only difference being the copy and an icon.

    So my question is, is it preferable to have more HTML (or in other words create more nested divs) and less CSS, or have less HTML (have less nested divs or none at all) and more CSS...keeping in mind that they will look exactly the same whichever way you do it....

    To me, having less HTML seems more organized, so that all you have to do is worry about the style sheet, but perhaps having more nested divs and less css is better for other reasons??...I see it all the time, parts of webpages that use 4 or 5 levels of nested divs and always wonder why when they could have simply done 2 and achieve the same effect.

    Anyways, just curious here...I just assume it's a matter of prefernce, but I also like the idea of standardizing my HTML and CSS coding as much as possible.

    Thanks a lot.

  2. #2
    Join Date
    Apr 2009
    Location
    Bristol, U.K.
    Posts
    1,120
    I'd say keep your HTML to a minimum. A stylesheet will remain cached in a users browser so that speeds things up and it is simply more flexible when it comes to updates. As CSS is the practice of separating style from content, why have more content?


    "Reliable and affordable web design - Bristol, UK"

    Website Links: Bristol Web Design | Bristol IT Support | Corrosive Online
    Social Media for Yoto Creative: Follow Us | Like Us

Similar Threads

  1. HTML versus XHTML, Inline CSS versus External CSS
    By junkeeper in forum Web Design, HTML Reference and CSS
    Replies: 0
    Last Post: 23 Jan 2010, 10:20 AM
  2. Web Designing languages HTML, CSS & XML
    By daleclara in forum Web Design, HTML Reference and CSS
    Replies: 0
    Last Post: 14 Sep 2009, 04:23 AM

Posting Permissions

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