0

<span> tag

The <span> tag is an inline container used to mark up a part of a text, or a part of a document. in w3school says. So what's the diffrence than just adding <strong> or color:red ?? and it also says its like a div. I don't get it. How it's like a <div> tag ??

18th May 2022, 9:16 AM
Lalala
Lalala - avatar
2 odpowiedzi
+ 1
<div> and <span> do not have any semantic meaning. You can style them however you like. <strong> has a semantic meaning "strong" importance. Most browsers will have some default styling for it. https://www.w3schools.com/html/html5_semantic_elements.asp
18th May 2022, 9:28 AM
Lisa
Lisa - avatar
0
it do all what div do but in inline display example:if you want to put 2 paragraphs beside each other use span /or use div with display flex and change float in that example using span easier
18th May 2022, 2:10 PM
ESLAM YASSER
ESLAM YASSER - avatar