HTML and CSS Reference
In-Depth Information
Name
ID Selector
Pattern:
element1#idname
Description:
In languages that permit it, such as HTML or XHTML, an ID selector using “hash notation”
can be used to select elements that have an ID containing a specific value or values. The name
of the ID value must immediately follow the octothorpe ( # ). If no element name precedes the
octothorpe, the selector matches all elements containing that ID value.
Examples:
h1#page-title {font-size: 250%;}
body#home {background: silver;}
#example {background: lime;}
Search WWH ::




Custom Search