ID Selector: #

Pattern:

element#IDNAME

 

Definition:

The element#IDNAME selector matches any element whose ID attribute has the value IDNAME. The IDNAME must immediately follow the "#". 

 

Examples:

Assign styles to all elements with id="name"

*#name{ text-decoration: underline; }

or simply

#name { text-decoration: underline; }

Style all <h1> elements with id="title"

h1#title { font-family: fantasy; }
w10schools
2014-11-10 15:34:38
#
Comments
Leave a Comment

Please login to continue.