+ 1

blog progect in html

what does the <span> do?

20th Oct 2019, 2:20 PM
Asma Mohamed hussein
Asma Mohamed hussein - avatar
2 Antworten
+ 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.
20th Oct 2019, 2:34 PM
Matt Watkins
Matt Watkins - avatar
+ 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>
20th Oct 2019, 10:50 PM
Xyenia 🦉
Xyenia 🦉 - avatar