HTML <span> Tag

109    Share

class on span elements


In the following example we have two <span> elements with a class attribute with the value of "note". Both <span> elements will be styled equally according to the .note style definition in the head section:


Live Demo & Try it yourself! Read More » »

The <span> Element


The <span> element is an inline container used to mark up a part of a text, or a part of a document.

The <span> element has no required attributes, but styleclass and id are common.

When used together with CSS, the <span> element can be used to style parts of the text:


Live Demo & Try it yourself! Read More » »