Skip to content

Latest commit

 

History

History

05.3-id-selector

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
tutorial

05.3 The ID CSS Selector

You can also select an element by #id and apply styles to it.

The #id selector

#small{
    font-size: 9px;
}

Use the id property of the HTML element to select it. ids should be unique, don't use the same id on more than one element.

The HTML tag with the id="small" will have a font-size of 9px.

📝 Instructions:

  1. Add the id button1 on to the <span> tag and compile to check the result on the console.