Jump to content
Sign in to follow this  
rootKID

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

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

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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...

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...