CSS frameworks and HTML semantics.

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
JellyFish
DevNet Resident
Posts: 1361
Joined: Tue Feb 14, 2006 7:18 pm
Location: San Diego, CA

CSS frameworks and HTML semantics.

Post by JellyFish »

What are you opinions on CSS frameworks? Are they good for the web or are they not semantic enough? Blueprint seems to be good but are there any cons to css frameworks?

Also has anyone every thought it wouldn't be interesting in HTML if element names acted more like variable names, that is, custom tags. Sense in CSS you can write 'div' and it'll select all div elements, I don't see how custom tags would be a problem when it comes to CSS. This way the web will, when used properly, be more semantic.

Code: Select all

 
<body>
  <header>
    <logo src="/images/global/logo.png" alt="Company Name"/>
    <slogan>Wholoobopin</slogan>
    <nav>
      ...
    </nav>
  </header>
  <maincontent>
    <!-- etc. -->
  </maincontent>
</body
 
 
 
You get the idea, a more XML approach to HTML. Maybe XHTML should go down this road seeing how the X in XHTML is a little deceptive (What's extensible in XHTML?).

This would add another identification method to the mix of #ids and .classes. Well, it wont add because element names are already in the mix, but it'll flex them a bit.

What are your thoughts? I mean, why do we need to write:

Code: Select all

 
<div id="header"></div>
 
when it makes just as much sense like:

Code: Select all

 
<header></header>
 
? What we end up with in the former is a bunch of divs. What does div even mean and how is it semantic to a header?

I'm not saying to get rid of ids and classes. Element names should correspond to what content they hold, class names should correspond to what class they belong to, and ids should be a unique identification to the element regardless of the element name or class.

The only downside to custom HTML tags is that the browser would have to download the extra style for them. But there could always be a standard of styling a select few elements. There could even be a standard to how a custom element should act by default.

I know I talked a lot about custom elements but don't forget about the CSS frameworks part of this post. *sigh*
User avatar
kaszu
Forum Regular
Posts: 749
Joined: Wed Jul 19, 2006 7:29 am

Re: CSS frameworks and HTML semantics.

Post by kaszu »

CSS frameworks can be useful, but I haven't used them for any project because they contain a lot of styling information I probably won't need. Only 'framework' what I use is my own CSS reset (if it can be called a framework).
Post Reply