Saturday, February 6, 2016

Internal Style information

Explanation:

Internal Style Sheet is a type of CSS.  Adding the Style Attribute or Attributes on a < style > element the HTML page. Style attribute(s) are clubbed together are named as either CLASS or ID.

What is the difference between CLASS & ID in Style Sheet?
CLASS - any valid CSS name which starts with DOT (.) are class.
ID - any valid CSS name which starts with # are id.

When can we use CLASS & ID?
Usage of CLASS - whenever a same style sheet is required in many places, in that case we have use it as class.
Usage of ID - whenever an unique style sheet is required in a webpage then we can go with id.

Example #1:


Example #2:



For Additional Reference

No comments:

Popular Posts