Jump to content

DIV tags


danhodge

Recommended Posts

Okay, im wanting to have several layers in a website like i had done using HTML5 with the stuff like:

<section>
title
<article>
Waffles
</articles>
</section>

 

But, im going back to HTML4 to use DIV tags, and im confused about how the ordering works.

 

So my question is how does the website decide which </div> goes to which <div id>?

Link to comment
Share on other sites

Why are you going back from HTML5 to HTML4?

 

I realise that the new tags like <header> <aside> <article> <section> cannot be styled in IE because it doesn't recognise the new tags. However, a bit of javascript will add these new tags to the DOM treee so that you can style them with normal (old) attributes like width, height, margin, background, etc. but the javascript won't make new tags like <video> or <canvas> process, so as long as you only want to use the new tags with styling, use this javascript in the head section:-

   <!--[if IE]>
   <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
   <![endif]-->

 

It only applies to IE but recent versions of Firefox, Safari, Chrome and Opera already accept styles for most new tags. If you open the link in Notebook you will see which tags are covered.

 

See also http://blancer.com/tutorials/wp/15301/10-ways-to-make-internet-explorer-act-like-a-modern-browser/

Link to comment
Share on other sites

I understand it sounds stupid, since HTML 5 makes things so much easier in terms of presentation and organization of your page, but until IE9 becomes a proper update instead of a beta, i guess the Div tags seem more appealing to me since they work the exact same on every browser...

 

And thanks virtual, its what i am aiming for :D

Link to comment
Share on other sites

I understand it sounds stupid, since HTML 5 makes things so much easier in terms of presentation and organization of your page, but until IE9 becomes a proper update instead of a beta, i guess the Div tags seem more appealing to me since they work the exact same on every browser...

 

Keep in mind that even when IE9 officialy launches you still have to wait longer for the market to catch up in order to use HTML5 and CSS3 without worrying about how it would behave in IE8, IE7 or whatever other older versions that users may have. Even IE6 is still around (less than 4%).

 

So if you want to use the new HTML5 and CSS3 now then you will more than likely will have to code for HTML4 and CSS2.1 as well to satisfy just about all the users in the market.

 

Note: I personally no longer code for IE6. After about 1 year, so far no one has complained to any of my clients.

Link to comment
Share on other sites

  • 9 months later...

Yes it does dimple... it can also be explained as an empty box with no formatting attached which is more useful to beginners. So either answer the questions or keep quiet rather than use not requested answers to up your posting numbers.

 

I agree with Eddie as usual about support not being as important as usage. Keep in mind some corporations or organizations require the use of one browser and maybe even version for different reasons. Then there are the folks who are allergic to upgrades until it is forced on them.

 

But do not worry about "I understand it sounds stupid, since HTML 5 makes things so much easier...". HTML 5 is not even a standard yet and will not be for another couple of years... so HTML 4 is the "correct" choice if you want to get technical.

Link to comment
Share on other sites

  • 2 months later...
  • 4 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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...
×
×
  • Create New...