CSS Multiple choices


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

Which is the correct CSS syntax?


 

 

 

 



A


Solution:-

The selector points to the HTML element you want to style. The declaration block contains one or more declarations separated by semicolons. Each declaration includes a CSS property name and a value, separated by a colon.

The CSS Syntax is made up of three parts: 
a selector, 
a property, 
a value

Syntax: selector {property: value}

The CSS properties specify what to style of the targeted HTML elements. 
Here is a CSS rule example: 

div { border-bottom: 1px solid red; font-weight : bold; }?

This example creates a CSS rule that targets all div elements and then sets the CSS properties border-bottom and font-weight for the targeted elements.




Next 5 multiple choice(s)

1

How do you insert a comment in a CSS file?

2

Which property is used to change the background color?

3

How do you add a background color for all <h1> elements?

4

Which CSS property is used to change the text color of an element?

5

Which CSS property controls the text size?

Comments