What is the difference in <div id=article> and <article> | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

What is the difference in <div id=article> and <article>

9th Dec 2016, 9:48 AM
Tahseen
3 Answers
+ 5
article is a html5 tag which is used to make article. div id=article creates a division. you can select it by id to style it as article or script it. it is just a division. if you are asking about output then like many other tags it will also produce same result but article tag should be used as it is semantic. div is just a division like other you can give other names too instead of article.
9th Dec 2016, 9:58 AM
Sandeep Chatterjee
+ 1
<Div id=article> that only means you've given the div an identification so its easier for you to modify it using CSS, and article is the same as you know it its an article that you can put element or objects in it
9th Dec 2016, 3:44 PM
Zouhair Loucif
Zouhair Loucif - avatar
0
The article element represents a component of a page that consists of a self-contained composition in a document, page, application, or site and that is intended to be independently distributable or reusable, e.g. in syndication. This could be a forum post, a magazine or newspaper article, a blog entry, a user-submitted comment, an interactive widget or gadget, or any other independent item of content.
9th Dec 2016, 10:01 AM
Aamir khan