HTML span

From Htmlpedia
Jump to: navigation, search

HTML Element SPAN

Definition and Usage

The <span> tag is used to group in-line elements in a document. [1] This makes it ideal for styling in-line elements.


Examples

<p>I really like the color <span style="color:#0000FF;">blue, yes I</span> do.</p>
<br />
<span title="Title!">I am in a span!</span>

Outputs

I really like the color blue, yes I do.


I am in a span!


Attributes

Standard Attributes

id, class, title, style, dir, lang

Event Attributes

onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup


Reference

  1. w3schools.com HTML SPAN TAG