CSS for Web Development

0% completed

Previous
Next
Quiz
Question 1
How can you make sure that the total width of an element remains 300px, including padding and borders, using CSS?
A
Set box-sizing: content-box; on the element.
B
B) Set box-sizing: border-box; on the element.
C
Use max-width: 300px; instead of width: 300px;.
D
Set width in percentages.
Question 2
Using the default content-box model, what is the total computed width of an element set with:
width: 200px;
padding: 10px;
border: 5px solid;
A
200px
B
220px
C
230px
D
240px
Question 3
In the context of the box model, which of the following is true?
A
Padding is added inside the element’s width and height.
B
In the border-box model, the defined width and height include padding and border.
C
Margin is a part of the element’s width as defined by CSS.
D
The box model only accounts for content and borders.

.....

.....

.....

Like the course? Get enrolled and start learning!
Previous
Next