Fundamentals of Front End Development MCQs with Answers
Practice important Fundamentals of Front End Development MCQs with answers and explanations.
Chapter: 49
Q561:
What effect does the property `#home a:hover { background: url('img_navsprites_hover.gif') 0 -45px; }` have?
A. It changes the background image and its position on hover
B. It changes the text color on hover
C. It adjusts the width of the navigation item on hover
D. It adds a border around the navigation item on hover
Correct Answer:
A
Chapter: 50
Q562:
What is the purpose of the "voice-family" property in CSS?
A. To define screen layout
B. To specify print styles
C. To manage aural styles
D. To set font sizes
Correct Answer:
C
Chapter: 50
Q563:
Which CSS property can be used for both screen and print media?
A. margin
B. color
C. font-size
D. display
Correct Answer:
C
Chapter: 50
Q564:
Which type of font is generally easier to read on a screen?
A. Serif
B. Sans-serif
C. Monospace
D. Cursive
Correct Answer:
B
Chapter: 50
Q565:
What does the @media rule allow you to do in a stylesheet?
A. Embed JavaScript
B. Define media types
C. Import fonts
D. Apply different styles for different media
Correct Answer:
D
Chapter: 50
Q566:
What font-family is used for screen media in the provided CSS example?
A. Arial
B. Times New Roman
C. Georgia
D. Verdana
Correct Answer:
D
Chapter: 50
Q567:
In the example CSS, what font size is applied to screen media?
A. 12px
B. 14px
C. 17px
D. 20px
Correct Answer:
C
Chapter: 50
Q568:
What color is the text when the page is printed according to the example?
A. Black
B. Blue
C. Red
D. Green
Correct Answer:
B
Chapter: 50
Q569:
The font-size for print media in the provided CSS example is:
A. 12px
B. 14px
C. 16px
D. 17px
Correct Answer:
B
Chapter: 51
Q570:
Which CSS selector is used to style elements with a specific attribute?
A. Class selector
B. ID selector
C. Attribute selector
D. Universal selector
Correct Answer:
C
Chapter: 51
Q571:
What is the purpose of the [attribute=value] selector in CSS?
A. To select elements with any attribute
B. To select elements with a specific attribute and value
C. To select elements based on ID
D. To select all elements
Correct Answer:
B
Chapter: 51
Q572:
Which selector would you use to style an element whose attribute value starts with a specific value?
A. [attribute^=value]
B. [attribute$=value]
C. [attribute~=value]
D. [attribute*=value]
Correct Answer:
A
Chapter: 51
Q573:
How does the [attribute~=value] selector function?
A. Selects elements with attributes starting with the value
B. Selects elements with attribute values containing a word
C. Selects elements with attribute values ending with the value
D. Selects all elements with the specified attribute
Correct Answer:
B
Chapter: 51
Q574:
The [attribute*=value] selector is used to:
A. Select elements with an attribute containing the value
B. Select elements with an attribute starting with the value
C. Select elements with an attribute ending with the value
D. Select elements with any attribute
Correct Answer:
A
Chapter: 51
Q575:
What CSS selector would you use to style all <a> elements with a target attribute?
A. a[target]
B. a[class]
C. a[href]
D. a[id]
Correct Answer:
A
Chapter: 51
Q576:
Fill in the blank: The selector [class*="te"] will select elements with a class attribute containing the value "__".
A. te
B. top
C. test
D. text
Correct Answer:
A
Chapter: 51
Q577:
Fill in the blank: The [title~="flower"] selector will style elements with a title attribute containing the word "__".
A. flower
B. top
C. test
D. title
Correct Answer:
A
Chapter: 51
Q578:
Which CSS selector is used to style form input elements of type "text"?
A. input[type="submit"]
B. input[type="text"]
C. input[type="button"]
D. input[type="checkbox"]
Correct Answer:
B
Chapter: 51
Q579:
How wide will a form input element of type "text" be, according to the provided CSS?
A. 100px
B. 120px
C. 150px
D. 200px
Correct Answer:
C
Chapter: 51
Q580:
Fill in the blank: To style all buttons in a form, you would use the selector ___.
A. input[type="text"]
B. input[type="submit"]
C. input[type="button"]
D. input[type="checkbox"]
Correct Answer:
C