Before you take your quiz, work through the review activity below.
What style would you apply to a div so that the text inside it leaves 20px of space on the left?
-
<div style="padding-left:20px;"></div>
-
<div style="left-padding:20px;"></div>
-
<div style="margin-left:20px;"></div>
-
<div style="left-margin:20px;"></div>
For the text to leave space, you need to add space inside the div.
For the text to leave space, you need to add space inside the div.
For the text to leave space, you need to add space inside the div.
For the text to leave space, you need to add space inside the div.
Which code excerpt would successfully put 30px of space between two paragraphs?
-
<p style="margin-bottom:15px;">Paragraph 1</p> <p style="margin-top:15px;">Paragraph 2</p>
-
<p style="margin-bottom:30px;">Paragraph 1</p> <p>Paragraph 2</p>
-
<p style="margin-bottom:10px;">Paragraph 1</p> <p style="margin-top:20px;">Paragraph 2</p>
-
<p>Paragraph 1</p> <p style="margin-bottom:30px;">Paragraph 2</p>
If there are competing margins between two block elements, only the larger margin will be used.
If there are competing margins between two block elements, only the larger margin will be used.
If there are competing margins between two block elements, only the larger margin will be used.
If there are competing margins between two block elements, only the larger margin will be used.
Which styles would be needed to produce this border around a div?
-
border:3px double #000000;
-
border-left:medium dashed #000000; border-top:medium dashed #000000; border-bottom:medium dashed #000000;
-
border:thick dotted #000000; border-right:none;
-
border:thin dashed #000000; border-right:none;
The border shown is black, thick, and is dotted all the way around except for the right side.
The border shown is black, thick, and is dotted all the way around except for the right side.
The border shown is black, thick, and is dotted all the way around except for the right side.
The border shown is black, thick, and is dotted all the way around except for the right side.
What is the shortest way to correctly add a margin of 20px to the top and bottom and a margin of 10px to the left and right?
-
margin-top:20px; margin-right:10px; margin-bottom:20px; margin-left:10px;
-
margin:20px 10px 20px 10px;
-
margin:10px 20px 10px 20px'
-
margin:20px 10px;
The quickest way to add "pairs" of equal margins is to set one value for the top/bottom and then another for left/right.
The quickest way to add "pairs" of equal margins is to set one value for the top/bottom and then another for left/right.
The quickest way to add "pairs" of equal margins is to set one value for the top/bottom and then another for left/right.
The quickest way to add "pairs" of equal margins is to set one value for the top/bottom and then another for left/right.
You have a div in your layout that can take up 400px by 400px of space total. You'd like to fit four images into the div in a 2x2 grid. Each image is 175px by 175px, and each one has a 2px border around it. How much padding can you add to the div?
-
<div style="padding:110px;"></div>
-
<div style="padding:46px;"></div>
-
<div style="padding:21px;"></div>
-
<div style="padding:17px;"></div>
Because the measurements are the same for width and height, the same formula would be used for either. 400px[div] - 350px[images] - 8px[borders] = 42/2 = 21px of padding on every side.
Because the measurements are the same for width and height, the same formula would be used for either. 400px[div] - 350px[images] - 8px[borders] = 42/2 = 21px of padding on every side.
Because the measurements are the same for width and height, the same formula would be used for either. 400px[div] - 350px[images] - 8px[borders] = 42/2 = 21px of padding on every side.
Because the measurements are the same for width and height, the same formula would be used for either. 400px[div] - 350px[images] - 8px[borders] = 42/2 = 21px of padding on every side.
Summary
Questions answered correctly:
Questions answered incorrectly: