0% found this document useful (0 votes)
57 views

Sample Questions CSS

The document contains a series of multiple choice questions about CSS properties, values, and selectors. Some key points covered include: - The "important" keyword is used to override style precedence and inheritance. - RGB, HSL, and RGBA values that represent the color blue. - Selectors like "aside > p" that match specific element relationships. - Properties like "text-decoration: none;" that remove underlines from links. - The @font-face rule used to define web fonts.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views

Sample Questions CSS

The document contains a series of multiple choice questions about CSS properties, values, and selectors. Some key points covered include: - The "important" keyword is used to override style precedence and inheritance. - RGB, HSL, and RGBA values that represent the color blue. - Selectors like "aside > p" that match specific element relationships. - Properties like "text-decoration: none;" that remove underlines from links. - The @font-face rule used to define web fonts.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 13

What keyword do you add to a style property to override style precedence and style inheritance?

cascade!

use!

important!

import!
-------------------------------------------------------------------------------------------------------------------------------------------
---------------------------

CSS comments are entered as:

/* comment */

! comment !

/* comment

<!--- comment --->

-------------------------------------------------------------------------------------------------------------------------------------------
---------------------------

Which of the following values is used to represent the color red?

rgb(10, 0, 0)

rgb(1000, 0, 0)

rgb(255, 0, 0)

rgb(0, 255, 0)

-------------------------------------------------------------------------------------------------------------------------------------------
---------------------------

What is the hue associated with the color value hsl(90, 100%, 50%)?

90

100%
50%

Cannot be determined by the color value

-------------------------------------------------------------------------------------------------------------------------------------------
---------------------------

What is the HSL color value for red displayed with the highest saturation and lightness and with 50%
transparency?

hsl(0, 100%, 100%, 0.5)

hsl(255, 100%, 100%, 0.5)

hsla(0, 100%, 100%, 0.5)

hsla(0.5, 0, 100%, 100%)

-------------------------------------------------------------------------------------------------------------------------------------------
---------------------------

What is the style to display h1 headings in green text on a yellow background?

h1 {color: green; background-color: yellow;}

h1 {color: green; bgcolor: yellow;}

h1 {text: green; background: yellow;}

h1 {textColor: green; backgroundColor: yellow;}

-------------------------------------------------------------------------------------------------------------------------------------------
---------------------------
Which of the following matches the color blue?

rgb(0, 0, 255)

hsl(240, 100%, 50%);

rgba(0, 0, 255, 1)

All of the above

Which of the following selectors is used to match only paragraphs that are children of the aside
element?

aside p

aside > p

All of the above

-------------------------------------------------------------------------------------------------------------------------------------------
---------------------------

For the following style rules, what is the font size of the h1 heading in pixels?

body {font-size: 16px;}

body > article {font-size: 0.75em;}

body > article > h1 {font-size: 1.5em;}


16px;

12px;

18px;

18.25px;

-------------------------------------------------------------------------------------------------------------------------------------------
---------------------------

Provide a style rule to remove underlining from hypertext links marked with the <a> tag and nested
within a navigation list.

nav > a {text-decoration: none;}

nav > a {text-decoration: no-underline;}

nav a {text-decoration: none;}

nav a {text-decoration: underline=“no”;}

-------------------------------------------------------------------------------------------------------------------------------------------
---------------------------

Provide an @font-face rule to create a web font named Cantarell based on the font file cantarell.woff
and cantarell.ttf.

i. @font-face {
   font-family: Cantarell;

   src: url(‘Cantarell.woff’) format(‘woff’),

   src: url(‘Cantarell.ttf’) format(‘truetype’);

ii. font-family: Cantarell, cantarell.woff, cantarell.ttf.

iii. Cantarell {

   src: url(‘Cantarell.woff’) format(‘woff’),

   src: url(‘Cantarell.ttf’) format(‘truetype’);

iv. All of the above will work

-------------------------------------------------------------------------------------------------------------------------------------------
---------------------------

Which of the following provides a style rule to display all blockquote elements belonging to the Reviews
class in italic and indented 3em?

i. Reviews > blockquote {

   font-style: italic;
   indent: 3em;

ii. blockquote#Reviews {

   font-style: italic;

   indent: 3em;

iii. blockquote.Reviews {

   font-style: italic;

   text-indent: 3em;

iv. blockquote#Reviews {

   italic: true;

   indent: 3em;

-------------------------------------------------------------------------------------------------------------------------------------------
---------------------------
Which of the following style rules will center the text of all h1 through h6 headings with the text
displayed at normal weight?

i. h1 - h6 {

   text-align: center;

   weight: normal;

ii. h1, h2, h3, h4, h5, h6 {

   align: center;

   weight: normal;

iii. h1, h2, h3, h4, h5, h6 {

   text-align: center;

   font-weight: normal;

iv. h1 - h6 {
   text-align: center;

   font-weight: normal;

You might also like