- 1
What are the use of <span> tag and its advantages.?
I have completed more than 50% HTML course but still don't what are the use of <span> tag and its advantages.?
3 odpowiedzi
+ 6
You can use <span> to style specific words and also you can add "id" and "class" to access them in js, <span> is inline tag so it can be used with Inline as well as Block level elements.
example : 👇
https://code.sololearn.com/WwK3gb5AG3Hy/?ref=app
+ 3
Just search on Google for more information. Sololearn has only basic things.
+ 1
span tag is inline tag
Suppose you have a text and you wish to color only specific word(s) not the whole sentence then for this purpose there's span tag
While filling form online you might have encountered a * mark in red color possible using span tag.