CSS Multiple choices


Total available count: 25
Subject - Web Development
Subsubject - CSS

How do you select an element with id "demo"?


 

 

 

 



C


Solution:-

The CSS id Selector:-

  1. The id selector uses the id attribute of an HTML element to select a specific element
  2. The id of an element is unique within any web page, so the id selector is used to select one unique element
  3. To select an element with a specific or particular id, write a hash (#) character, followed by the id of the element
  4. The following example shows how the CSS rule will be applied to the HTML element with id="slightBook"
#slightBook { text-align: right; background-color: yellow; }

 




Next 5 multiple choice(s)

1

How do you make a list that lists its items with squares?

2

When using the padding property; are you allowed to use negative values?

3

Which property is used to change the left margin of an element?

4

How do you display a border like this:
The top border = 10 pixels
The bottom border = 5 pixels
The left border = 20 pixels
The right border = 1pixel?

5

How do you make the text bold?

Comments