Files
freeCodeCamp/curriculum/challenges/english/25-front-end-development/quiz-basic-css/66ed8fa2f45ce3ece4053eab.md
T
2024-10-21 09:50:06 +00:00

5.2 KiB

id, title, challengeType, dashedName
id title challengeType dashedName
66ed8fa2f45ce3ece4053eab Basic CSS Quiz 8 quiz-basic-css

--description--

Answer all of the questions below correctly to pass the quiz.

--quizzes--

--quiz--

--question--

--text--

What does CSS stand for?

--distractors--

Cascading Style Script


Concatenating Style Script


Castor Sage Style

--answer--

Cascading Style Sheets

--question--

--text--

Which answer uses the correct structure of using a CSS rule?

--distractors--

p=red


p (color: red)


{p color: red;}

--answer--

p {color: red;}

--question--

--text--

What does <meta name="viewport"> do?

--distractors--

Establishes flexbox within the device.


Creates the font for the device.


Makes the website automatically responsive.

--answer--

Controls the shape and size of the web page from a user's device.

--question--

--text--

Which syntax is correct to use inline CSS?

--distractors--

<p color = blue></p>


<p><style = blue></p>


p {color: blue;}

--answer--

<p style="color: blue;"></p>

--question--

--text--

When using internal CSS, where is the style element placed within the HTML?

--distractors--

In the meta element


In the script element


In the body element

--answer--

In the head element

--question--

--text--

Which rule is correct for setting the width and height in CSS?

--distractors--

height-width: 50px;


width-and-height: 50px;


flex-width: 50px; flex-height: 50px;

--answer--

width: 50px; height: 50px;

--question--

--text--

Which selector is correct to target h1 elements inside of a div?

--distractors--

div + h1 {}


div ~ h1 {}


div > h1 {}

--answer--

div h1 {}

--question--

--text--

Which selector is correct to target direct children of a footer?

--distractors--

footer ~ ul {}


footer + ul {}


footer ul {}

--answer--

footer > ul {}

--question--

--text--

Which selector is correct to target the next sibling of an img?

--distractors--

img h1 {}


img > h1 {}


img ~ h1 {}

--answer--

img + h1 {}

--question--

--text--

Which selector is correct to target all siblings of an img?

--distractors--

img > caption {}


img caption {}


img + caption {}

--answer--

img ~ caption {}

--question--

--text--

What statement is TRUE about block elements?

--distractors--

Blockline elements don't start on new lines.


Blockline elements only takes up as much as it needs.


Blockline elements come with no margin.

--answer--

Blockline elements start on a new line with margin before and after the element.

--question--

--text--

What statement is TRUE when using the inline-block value?

--distractors--

Doesn't allow you to set the height and width.


Top and bottom margins not respected.


Adds a line break after an element.

--answer--

Allows you to place elements next to each other while letting you set the height and width.

--question--

--text--

Given the following selectors, which has the highest specificity?

--distractors--

div


h1


p

--answer--

#id

--question--

--text--

Given the following selectors, which has the lowest specificity?

--distractors--

h1


#id


p

--answer--

div

--question--

--text--

What does the * selector do?

--distractors--

Targets some elements on the page.


Targets elements that have children on the page.


Targets all p elements on the page.

--answer--

Targets all elements on the page.

--question--

--text--

What does !important do in CSS?

--distractors--

It doesn't effect the code.


Applies to all properties in the code.


Applies on to a certain selector or group of elements.

--answer--

Overrides any other values applied to the property for that selector.

--question--

--text--

How does the CSS Cascade algorithm work?

--distractors--

Determines styles of the element based on alphabetical order.


Gives animations to the page.


Improves Search Emgine Optimization (SEO).

--answer--

Determines styles of the element based on specificity and order of declaration.

--question--

--text--

Which rule applies 32px of margin to all sides?

--distractors--

margin-top: 32px;


margin: 32px 0;


margin: 0 32px;

--answer--

margin: 32px;

--question--

--text--

Which rule applies 24px padding to the top and bottom?

--distractors--

padding: 24px;


padding-top-bottom: 24px;


padding: 0 24px;

--answer--

padding: 24px 0;

--question--

--text--

What does the line-height property do?

--distractors--

Controls the size of the font.


Controls the responsiveness of text.


Controls how much space is between the letters of text.

--answer--

Controls how much space is between the lines of text.