Fundamentals of Front End Development MCQs with Answers
Practice important Fundamentals of Front End Development MCQs with answers and explanations.
Chapter: 33
Q361:
What does the CSS font-family property define?
A. Font size
B. Font color
C. Font family
D. Font weight
Correct Answer:
C
Chapter: 33
Q362:
Which of the following is an example of a generic font family in CSS?
A. Times New Roman
B. Arial
C. Serif
D. Courier New
Correct Answer:
C
Chapter: 33
Q363:
Which CSS property allows setting multiple fallback fonts for a text?
A. font-family
B. font-size
C. font-style
D. font-weight
Correct Answer:
A
Chapter: 33
Q364:
What must be done if the name of a font family contains more than one word?
A. It must be bolded
B. It must be in quotation marks
C. It must be italicized
D. It must be underlined
Correct Answer:
B
Chapter: 33
Q365:
Which of the following is an example of a monospace font in CSS?
A. Arial
B. Verdana
C. Times New Roman
D. Courier New
Correct Answer:
D
Chapter: 33
Q366:
What is the purpose of specifying multiple font families in the font-family property?
A. To increase font size
B. To ensure a fallback if a font isn't supported
C. To change text color
D. To make text bold
Correct Answer:
B
Chapter: 33
Q367:
Which of the following is NOT a generic font family in CSS?
A. Monospace
B. Sans-serif
C. Serif
D. Times New Roman
Correct Answer:
D
Chapter: 34
Q368:
Which CSS property is used to make text italic?
A. font-weight
B. font-size
C. font-style
D. text-align
Correct Answer:
C
Chapter: 34
Q369:
What are the possible values for the font-style property?
A. bold, normal, underline
B. normal, italic, oblique
C. block, inline, flex
D. serif, sans-serif, monospace
Correct Answer:
B
Chapter: 34
Q370:
Which CSS property is used to set the size of the text?
A. font-size
B. font-family
C. font-style
D. text-transform
Correct Answer:
A
Chapter: 34
Q371:
Which font style value is similar to italic but less supported?
A. normal
B. italic
C. oblique
D. underline
Correct Answer:
C
Chapter: 34
Q372:
What is the default text size in most browsers?
A. 12px
B. 14px
C. 16px
D. 18px
Correct Answer:
C
Chapter: 34
Q373:
Which unit is recommended by W3C for setting font size to allow user resizing?
A. px
B. pt
C. em
D. %
Correct Answer:
C
Chapter: 34
Q374:
How do you calculate the size in em from pixels?
A. pixels/10=em
B. pixels/16=em
C. pixels/12=em
D. pixels/14=em
Correct Answer:
B
Chapter: 34
Q375:
What happens when you set the font size in pixels?
A. It gives full control over the text size
B. It allows users to resize text easily
C. It only works in Chrome
D. It automatically scales text based on screen size
Correct Answer:
A
Chapter: 34
Q376:
What should you use for headings in HTML instead of adjusting font size manually?
A. <p> tags
B. <div> tags
C. <span> tags
D. <h1> - <h6> tags
Correct Answer:
D
Chapter: 34
Q377:
Which of the following is an absolute size unit in CSS?
A. em
B. px
C. %
D. rem
Correct Answer:
B
Chapter: 34
Q378:
Which of the following statements about relative font sizes is true?
A. They are fixed and cannot be changed by the user
B. They are set relative to the surrounding elements
C. They don't work in older browsers
D. They always equal 16px
Correct Answer:
B
Chapter: 34
Q379:
How do you set a default font size in percent for the <body> element in CSS?
A. body {font-size: 16px;}
B. body {font-size: 1em;}
C. body {font-size: 100%;}
D. body {font-size: large;}
Correct Answer:
C
Chapter: 34
Q380:
Which value in the following code sets the font size for an h1 element? h1 {font-size: 2.5em;}
A. 1.5em
B. 1.875em
C. 0.875em
D. 2.5em
Correct Answer:
D