Why can't i use span tag instead of div tag? | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 1

Why can't i use span tag instead of div tag?

Difference between these two tags, How does inline element works?

20th Aug 2018, 8:52 AM
Sanjid Hossain
Sanjid Hossain - avatar
2 Réponses
+ 4
// The <span> tag is a inline element // The <div> tag is a block element
20th Aug 2018, 9:00 AM
program
program - avatar
+ 1
In addition to what // Zohir said, to answer the last part of your question, I think there are some images in these discussions (linked below) that help you get the gist of things, but playing with it yourself is the best way to understand it. https://stackoverflow.com/questions/9189810/css-display-inline-vs-inline-block https://css-tricks.com/almanac/properties/d/display/ https://codepen.io/edge0703/pen/iHJuA Also, questions nearly identical to these are asked quite often in this forum, so please search before posting to help conserve community resources (your time posting, our time reading, moderators' time reviewing, discussion area loading speeds, SoloLearn server space, etc.).
20th Aug 2018, 12:40 PM
Janning⭐
Janning⭐ - avatar