rootKID Posted December 31, 2012 Share Posted December 31, 2012 yoyo w3...a question is needed again.. i was the other day looking at a friends website, and i saw this in he's coding: EXAMBLE: <head><meta http-equiv='Content-Type' content='text/html'; charset='iso-8859-2' /><title>TITLE</title><link rel='shortcut icon' href='favicon.ico' /><link rel='stylesheet' href='CSS.css' type='text/css' /></head><body><main class='outer'><main class='main'>123</main></main></body></html> now to my question, the MAIN tags itself, is that a good or bad way of coding?... i mean, if it was me and i was designing, lets say a webshop, then i would use div's and tables... but the way he is coding, i did see it before some other time on a email system thing, but my question is if it would be better that way or the other?, or does it really matter?... -thanks Link to comment Share on other sites More sharing options...
jeffman Posted December 31, 2012 Share Posted December 31, 2012 Well, you do not want multiple body tags. Using div elements is a better solution. I hope that when you refer to tables, you mean for tabular data, not as a technique for laying out your document; use CSS for that. Now, in HTML5 you are no longer limited to div elements. Many new elements behave like divs but have different names (section, footer, etc.) to help you label parts of your document more semantically. There is no "main" element that I'm aware of. Most browsers won't care (they'll treat it like a div) but I would not use a non-standard element that way. Link to comment Share on other sites More sharing options...
davej Posted December 31, 2012 Share Posted December 31, 2012 What I have read is that you want to use the new HTML5 tags... http://www.w3schools.com/html/html5_new_elements.asp ...and then you want to check them with something like... https://chrome.google.com/webstore/detail/chrome-outliner/jlppdmdapoeahlgfmioblnpfhfgcigim ...to see if they form a descriptive and logical structure. But I'm still using divs when I'm just formatting and that is what this guy should be using. Link to comment Share on other sites More sharing options...
rootKID Posted January 1, 2013 Author Share Posted January 1, 2013 sorry for late reply, and thanks... i just needed your guys opinions... and dad, a answer for tables... yeah, only tabular data...never for normal design, there i would be a div guy... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now