- 1

Looking for the best explanation of how to use the <span> tag

23rd Oct 2021, 6:31 PM
galiwango Joseph
galiwango Joseph - avatar
3 Respostas
+ 2
In HTML, the span tag is a generic inline container element. Span tags usually wrap sections of text for styling purposes or for adding attributes to a section of text without creating a new line of content. The span element is called ‚Äúgeneric‚ÄĚ because the name of the tag itself doesn‚Äôt tell us anything about the contents of the element. In other words, ‚Äúspan‚ÄĚ doesn‚Äôt mean anything to us. The opposite of a generic HTML element is a semantic HTML element, one whose name describes its purpose (e.g., <p> for paragraph, <button>).
23rd Oct 2021, 8:18 PM
Matias - avatar
+ 1
Please always tag the language you're asking about. https://code.sololearn.com/W3uiji9X28C1/?ref=app
23rd Oct 2021, 6:44 PM
Simon Sauter
Simon Sauter - avatar
Span is used to "select" part of text, to style it with css, or select this and change value using JavaScript
23rd Oct 2021, 7:02 PM
PanicS - avatar