HTML <span> tag
Definitie en gebruik
<span>
Een tag is een container voor een regelinhoud, gebruikt om een deel van de tekst of een deel van het document te markeren.
<span>
The <span> tag can be easily styled with CSS, and can also be manipulated using class or id attributes through JavaScript.
<span>
The tag can be easily styled with CSS, and can also be manipulated using class or id attributes through JavaScript. The <div> element very similar, but <div> Is a block-level element, while <span>
Is an inline element.
See also:
HTML tutorial:HTML block and inline elements
HTML DOM reference manual:Span object
Example
Used to color a part of the text <span>
Element:
<p>This girl has a pair of <span style="color:blue">blue</span> eyes.</p>
Global attributes
<span>
The tag also supports Global attributes in HTML.
Event attributes
<span>
The tag also supports Event attributes in HTML.
Default CSS settings
None.
Browser support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |