Is <div> fully replaced by <article> in html 5? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 6

Is <div> fully replaced by <article> in html 5?

I just read that div is replaced by article element in html 5 which was widely used in html4 . does that mean divs are not used anymore in html5? are they still supported in html 5?

9th Mar 2017, 4:15 AM
Mahendra Aanjna
Mahendra Aanjna - avatar
8 Answers
+ 16
The HTML5 <article> element is like a specialised kind of <section>; it has a more specific semantic meaning in that it is an independent, self-contained part of the page. We could use <section>, but using <article> gives more semantic meaning. The generic flow container we all know as <div> quite simply is a block-level element with no additional semantic meaning permitted to content other elements. When you want to give your markup better meaning semantically, you code in Posh HTML. Google "Posh HTML semantics".
9th Mar 2017, 6:25 PM
Mark Foxx
Mark Foxx - avatar
+ 5
NO,div and article don't do same job
9th Mar 2017, 4:52 PM
Edwin Bello
Edwin Bello - avatar
+ 4
No, you can still use <div> tag.
10th Mar 2017, 6:00 AM
Binod Bhattarai
Binod Bhattarai - avatar
+ 4
The new tags like article, section, header, nav, etc are used for semantic meaning when appropried. This means that instead of a <div id="header"> you use the more obvious <header> tag. But if you want to add a slider to your header, for example, It isn't right to call it a "article" or "section" so in lack of sematic tags for this case we still use <div id/class="slider"> to add the custom style we want. Article and section are mostly used for the page text content, like a blog section with blog articles.
10th Mar 2017, 1:10 PM
Jose Oliv
Jose Oliv - avatar
+ 3
No, it's not fully replaced. Before html5, there was no article tag, so web developers had to simulate its behavior by means of a div tag. Plus, article provides some semantic meaning that div's cannot. div's are still very much used in html5.
9th Mar 2017, 5:38 AM
+ 2
<article> is not a replacement for <div> , but if you're used to <div> you can as well get your <article> rolling the same sleeves by defining a CSS rule stating the display type of <article> as block. article { display: block; }
10th Mar 2017, 3:27 PM
Ezekiel Oladejo
Ezekiel Oladejo - avatar
no bro
9th Mar 2017, 4:39 PM
Raji Abdulafeez Okikiola
Raji Abdulafeez Okikiola - avatar
nop you can still use div but lets just say article defines better your code
12th Mar 2017, 12:05 PM
Augustine Henry
Augustine Henry - avatar