- 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.?

17th Apr 2022, 3:48 AM
Sandip Joshi
Sandip Joshi - avatar
3 Answers
+ 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
17th Apr 2022, 12:30 PM
Sujal
Sujal - avatar
+ 3
Just search on Google for more information. Sololearn has only basic things.
17th Apr 2022, 4:15 AM
AÍąJ
AÍąJ - avatar
+ 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.
17th Apr 2022, 6:27 AM
Mohd Aadil
Mohd Aadil - avatar