An ID selector is declared using a hash, or pound symbol (#) preceding a string of characters. The string of characters is defined by the developer. This selector matches any HTML element that has an ID attribute with the same value as that of the selector, but minus the hash symbol. All ID's on a page should have a unique name.

#id {
    css declarations;
#list {
   color: #3366ff;
   background: #ffff99;

In this example, the elements with the id #list will have their color and background styles changed.

Click the button below to experiment with this selector.

Give it a Try!

YesFirefox YesExplorer YesChrome YesSafari YesOpera