Skip to content

Instantly share code, notes, and snippets.

@abdullahbutt
Last active December 29, 2015 02:09
Show Gist options
  • Select an option

  • Save abdullahbutt/7598480 to your computer and use it in GitHub Desktop.

Select an option

Save abdullahbutt/7598480 to your computer and use it in GitHub Desktop.
HTML <span> Tag
<!DOCTYPE html>
<html>
<body>
<p>My mother has <span style="color:blue;font-weight:bold">blue</span> eyes and my father has <span style="color:darkolivegreen;font-weight:bold">dark green</span> eyes.</p>
</body>
</html>
<!--
Definition and Usage
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.
Tips and Notes
Tip: When a text is hooked in a <span> element, you can style it with CSS, or manipulate it with JavaScript.
Differences Between HTML 4.01 and HTML5
NONE.
Global Attributes
The <span> tag also supports the Global Attributes in HTML.
http://www.w3schools.com/tags/ref_standardattributes.asp
Event Attributes
The <span> tag also supports the Event Attributes in HTML.
http://www.w3schools.com/tags/ref_eventattributes.asp
!-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment