Jump to content

is it possible to make an another body tag inside body tag, just with an another name?...


rootKID

Recommended Posts

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

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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...