+ 1
when do you use div?
so now we use html 5 section and articles and such. Do we still use div?
7 Answers
+ 2
Along with aside, articles, etc, section is basically just a specially named div new in HTML5. They are named in a way that gives more meaning to the layout and makes your code a bit easier to understand. They also behave better for screen readers (blind) so that the user can understand more behind the meaning of the content. You would use a div in a case in which none of these tags would really make sense or apply. Older browsers that don't yet support HTML5 will read the newer tags as a div and treat them accordingly.
+ 2
oh OK well thanks a lot that really helps me. I have known HTML for a long time just still trying to understand HTML 5 more plus practicing CSS more. but you helped alot thanks again
+ 1
Don't most people use newer browsers anyways? I thought everything always auto updates?
+ 1
I know a few people who are still using Windows XP. The newest IE version that XP uses doesn't support HTML5 and probably never will. So unless they're using an alternate browser such as Chrome or Firefox and their newest versions of those programs that can run on XP support HTML5, they will be seen by the browser as a div.
As a developer, you should try and develop for the broadest market possible in most cases.
+ 1
well that's why I'm asking these questions so I can understand how to reach as many as possible. but if you make a website with HTML 5 they can't see it? but then that means what's the point of designing in HTML 5 if they can't even see the site. I know the benefits of using HTML 5 but if I can't reach people with it then no reason to use sections or footer or header.
+ 1
No, sorry i think your misunderstanding. The user will still be able to see the site in their browser, but the browser will just interpret those other tags as a div. Some things may not visually appear the same, but for the most part there should be little to nothing to worry about when using the html5 tags on an older browser.
+ 1
In between <article> element.... you can use <div> element in place of <section> element...