+ 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?
8 Respuestas
+ 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".
+ 5
NO,div and article don't do same job
+ 4
No, you can still use <div> tag.
+ 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.
+ 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.
+ 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;
}
0
no bro
0
nop you can still use div but lets just say article defines better your code