+ 1
<span> what is the meaning of this tag?
15 Respuestas
+ 3
Abhay just to clarify, Div is actually a block element, while span is an inline element. These two serve different functions. Div is a container, while span is an element that goes inside <div> or <p>. Div cannot go inside of span however, as it is a block element, and blocks will not fit into single line elements. Cheers! 👍
+ 2
Abhay my pleasure! Keep on learning and practicing, and you'll be a great developer in a flash! 😊
+ 1
It's an inline object on a horizontal plane. Span is an English word. Span is used in HTML as an inline element, useful for text, photos, and buttons.
+ 1
Anthony Quick you are right ,I just learned that from some channel ,also I haven't used span (maybe just one ,two),so didn't knew actually about it ,just realised ,thks for correcting me
+ 1
You may find answer in https://www.geeksforgeeks.org/span-tag-html/
+ 1
You may go through https://www.tutorialspoint.com/html/html_span_tag.htm
+ 1
https://www.w3schools.com/tags/tag_span.asp
+ 1
Refer this
+ 1
The HTML <span> element is a generic inline container for phrasing content, which does not inherently represent anything. It can be used to group elements for styling purposes (using the class or id attributes), or because they share attribute values, such as lang. It should be used only when no other semantic element is appropriate. <span> is very much like a <div> element, but <div> is a block-level element whereas a <span> is an inline element.
+ 1
It is an inline html element used for text and images
0
Ok thanks brother
0
Anthony Quick thks
0
I kind of meant this ,also changing display:block for span and inline for div gave me an idea that div is block and span is inline
https://code.sololearn.com/W8Prd4dQe9XO/?ref=app
0
edited code ,now you can see if you have div ,it takes up all horizontal space and you can't put a different element next to it ,while with span you can
0
Span is a tag used in special circumstances for example <p> my name is html <span> im awesome</span> </p> so in css the span tag will make the line im awesome any colour you wanted it to be...its often used in highlighting statements.