What is the function of the <span> attribute? | Sololearn: Learn to code for FREE!
+ 1

What is the function of the <span> attribute?

Whilst learning HTML, I came across the <span> tag which was included in a code but didn't make any difference when I ran the code. The code goes thus <h2><span>About me</span></h2> With or without the span tag, the result is the same so why do we need it, please?

30th Apr 2019, 9:09 AM
henrytron
henrytron - avatar
2 Respostas
+ 1
It is used when you want to style with css.
30th Apr 2019, 9:13 AM
Aymane Boukrouh
Aymane Boukrouh - avatar