Pr.Pg Next Pg

<SPAN>..</SPAN> tag tutorials

  • The <span> tag is used to group inline-elements in a document. The <span> tag provides no visual change by itself.

  • The <span> tag provides a way to add a hook to a part of a text or a part of a document.

  • The <span> tag is supported in all major browsers.

  • The below table shows the attribute of <SPAN> tag:

 

Sr No

Attributes

Descriptions

1

ID

This attribute specify a unique id for an element in document.

2

style

This attribute specify an inline CSS style for an element.

3

title

This attribute specify extra information about an element.

4

draggable

This attribute specify whether an element is draggable or not.

5

hidden

This attribute specify that an element is not yet, or is no longer, relevant.

 

Syntax:

<body>

<span>some text</span>

</body>

 

Example: HTML program to demonstrate span element

Output:
Pr.Pg border                                              Next Pg