HTML Span Tag
In HTML, the
<span> tag is used to group elements for styling purposes.
<span>tag is also known as a generic container for the phrasing content.
<span>tag is much similar to
<div>tag ; but there is a difference as
<div>is a block-level element while
<span>is an inline element.
<span>tag does not inherently use to represent anything.
<span> tag-Syntax and Usage
<span> tag requires the start(opening) tag and end(closing) tag.
Given below is the basic syntax:
<span> ..content here </span>
<span> Tag Basic Example
Below we have a basic example of the <span > tag:
<span> Tag Attributes
<span> tag does not have any specific attributes; though it supports both global and event attributes.
Browser Support for HTML
Following browsers support this attribute:
Google Chrome 1+
Internet Explorer 3+