What is the difference between div tag and span tag ?
1 Like
Hello @hsbehera5 ,
A div element is used for block-level organization and styling of page elements, whereas a span element is used for inline organization and styling.
Generally one of basic application of span tag is to use it as word-highlighter.
Suppose you want highlight a word of a sentence then you can make use of span tag.
Example : CodeLink
#highLight{
background-color: lightgreen;
}
<p> I am Aspiring to become <span id="highLight"> Full Stack Web Developer </span>. </p>
O/P :
And to understand the difference between them please reach out this resource link
Ganesh Patil | TA - Edyoda
2 Likes