100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

CSS Questions and Answers

Rating
-
Sold
-
Pages
3
Grade
A+
Uploaded on
11-11-2024
Written in
2024/2025

CSS Questions and Answers An em represents which of the following? The size of the base font in use. The code below will display images in which of the following ways? .container { width: 50%; height: 200px; overflow: hidden;} .container img { max-width: 100%; height: auto; display: block;} Images will shrink to the full width of their container, scale proportionally, and display partially if the image dimensions exceed container dimensions. Previous Play Next Rewind 10 seconds Move forward 10 seconds Unmute 0:00 / 0:15 Full screen Brainpower Read More What are the maximum dimensions of a div with the following properties? iner { min-height: 150px; max-height: 600px; min-width: 300px; max-width: 900px;} 600 pixels tall and 900 pixels wide. What is needed to change the default font size of the root element? A CSS rule that targets the font-size of the <html> element. The following code will size all h1 elements in "splash-section" to how many pixels? html { font-size: 12px;} .splash-section { font-size: 16px;} .splash-section h1 { font-size: 1.5em;} 24 pixels Which of the following property/value pairs will ensure that the background image of the div in the code below will scale proportionally while filling the entire div? div { background-image: url('#'); background-repeat: no-repeat; background-position: center; / ? /} background-size: cover; The following code will set the text of a paragraph inside a .splash-section element to how many pixels? html { font-size: 16px;} .splash-section { font-size: 18px;} .splash-section p { font-size: 1.5rem;} 24 pixels Assume the default font size of a browser is 12 pixels. The following code will size the paragraph's text to how many pixels? p { font-size: 1.5em;} 18 pixels Which of the following is the root element that rems size relative to? <html> When percentages are used to size padding and width, dimensions are set relative to which of the following? The width of the parent element. When percentages are used to size height and width, dimensions are set relative to which of the following? The parent of a child element. What is the difference between an em and a rem? An em sizes relative to the current element's font-size or inherited base font-size, whereas rem sizes relative to the root element's font-size. Which of the following is an advantage of using relative units of measurements over hard-coded measurements? Relative units of measurements ensure consistent proportions across a website, regardless of screen size or layout. The height property in the code below should be set to which of the following values to ensure that the image remains proportional to its original size? img { width: 500px; height: ?} auto What are the minimum dimensions of a div with the following properties? iner { min-height: 150px; max-height: 600px; min-width: 300px; max-width: 900px;} 150 pixels tall and 300 pixels wide.

Show more Read less
Institution
SPLA
Course
SPLA








Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
SPLA
Course
SPLA

Document information

Uploaded on
November 11, 2024
Number of pages
3
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

CSS Questions and Answers
An em represents which of the following? - answer The size of the base font in use.

The code below will display images in which of the following ways?
.container { width: 50%; height: 200px; overflow: hidden;} .container img { max-width:
100%; height: auto; display: block;} - answer Images will shrink to the full width of
their container, scale proportionally, and display partially if the image dimensions
exceed container dimensions.

What are the maximum dimensions of a div with the following properties?
div.container { min-height: 150px; max-height: 600px; min-width: 300px; max-width:
900px;} - answer 600 pixels tall and 900 pixels wide.

What is needed to change the default font size of the root element? - answer A CSS
rule that targets the font-size of the <html> element.

The following code will size all h1 elements in "splash-section" to how many pixels?
html { font-size: 12px;} .splash-section { font-size: 16px;} .splash-section h1 { font-size:
1.5em;} - answer 24 pixels

Which of the following property/value pairs will ensure that the background image of the
div in the code below will scale proportionally while filling the entire div?
div { background-image: url('#'); background-repeat: no-repeat; background-position:
center; /* ? */} - answer background-size: cover;

The following code will set the text of a paragraph inside a .splash-section element to
how many pixels?
html { font-size: 16px;} .splash-section { font-size: 18px;} .splash-section p { font-size:
1.5rem;} - answer 24 pixels

Assume the default font size of a browser is 12 pixels. The following code will size the
paragraph's text to how many pixels?
p { font-size: 1.5em;} - answer 18 pixels

Which of the following is the root element that rems size relative to? - answer <html>

When percentages are used to size padding and width, dimensions are set relative to
which of the following? - answer The width of the parent element.

When percentages are used to size height and width, dimensions are set relative to
which of the following? - answer The parent of a child element.

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Pogba119 Harvard University
View profile
Follow You need to be logged in order to follow users or courses
Sold
48
Member since
1 year
Number of followers
2
Documents
4862
Last sold
3 weeks ago
NURSING TEST

BEST EDUCATIONAL RESOURCES FOR STUDENTS

3.9

9 reviews

5
4
4
2
3
2
2
0
1
1

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions