DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’» is a community of 964,423 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in
Cover image for Alternatives for the < div > tag.
Syed Ahmad Mustafa
Syed Ahmad Mustafa

Posted on • Updated on

Alternatives for the < div > tag.

The < div > tag defines a division or a section in an HTML document. The div tag is used as a container for HTML elements - which is then styled with CSS or manipulated with JavaScript.

Although, there are a few alternatives as well!

Alt Text

Alt Text

Alt Text

Alt Text

Alt Text

Alt Text

More info can be found here -
https://www.w3schools.com/tags/default.asp

Top comments (4)

Collapse
 
kewbish profile image
Emilie Ma

Just letting you know, the <div> tags render strangely, and there's a little missing block and weird formatting. You might want to wrap it in a codeblock! :)

Collapse
 
totallymustafa profile image
Syed Ahmad Mustafa Author

Will keep that in mind πŸ€Ήβ€β™‚οΈ

Collapse
 
hxii profile image
Paul (hxii) Glushak • Edited on

It should be mentioned that all the different tags you wrote about are not alternatives, per se, but rather semantic HTML.

Collapse
 
totallymustafa profile image
Syed Ahmad Mustafa Author

The short description for each tag makes it clear I guess, and even if that wasn't enough, now people can see your comment as well πŸ‘.

Update Your DEV Experience Level:

Settings

Go to your customization settings to nudge your home feed to show content more relevant to your developer experience level. πŸ›