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
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>
Code: Select all
<header></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*