I agree with you. Information within the code that's meant for humans
to read should go into comments; div and ID names themselves should be
fairly descriptive anyway (#maincontent, #leftcol etc.).  HTML
elements such as divs are meant to be read only by the browser and
making the browser search the stylesheet for non-existent elements
must have some effect on performance.
And, as you point out, there's scope for forgetting to close a div.

Val


On 11 July 2010 21:10, Tim Offenstein <t...@illinois.edu> wrote:
> I'd like some feedback on this. I'm teaching a class on web design to 
> students who've had various levels of training. I'm seeing a number of 
> students mark up their XHTML with descriptively named DIVs that have no 
> counterpart in the CSS. Is this some kind of XML holdover or what? Am I 
> missing some coding practice or method for why this is being done? I don't 
> recommend this because (1) it clogs up the HTML with useless stuff, and (2) 
> there's potential to break the page if a DIV isn't closed. If this is an 
> attempt to section/categorize the code, simple HTML comments will serve the 
> purpose much better.
>
> Any thoughts?
>
> -Tim
>
-- 
---------------------------
"Somewhere, something incredible is waiting to be known" - Carl Sagan
www.oakleafdesignprint.co.uk
www.oakleafcircle.org.uk
www.valdobson.co.uk
www.astrodiary.co.uk
______________________________________________________________________
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to