+ 1
blog progect in html
what does the <span> do?
2 odpowiedzi
+ 3
The <span> tag is used to group inline-elements in a document, it doesn’t provide any visual change by itself and it provides a way to add a hook to a part of a text or a part of a document.
+ 1
I agree with Matt. The hook, being, a css class or id tag identifier for css or javascript.
Let's say you create a paragraph with 6 sentences and you want to highlight, stand out or style sentence 4.
Your paragraph <p> might have some css styling applied which affects all the sentences. You could then wrap sentence 4 in <span> tags and apply a css class to it.
<span class="sentence4styling">Beautifully styled sentence 4</span>