CSS Questions & Answers – Style Inclusion Methods

This set of CSS Multiple Choice Questions & Answers (MCQs) focuses on “Style Inclusion Methods”.

1. Which of the following tag is used to linked information should be placed inside?
a) <head>
b) <html>
c) <div>
d) <body>
View Answer

Answer: a
Explanation: Linked information regarding CSS like external CSS document information is always placed in <head> tag. <body> tag contains the body of the document.

2. Which of the following tag can be used to embed a Document-wide styles in a document’s head element?
a) <head>
b) <style>
c) <script>
d) <html>
View Answer

Answer: b
Explanation: Document-wide styles can be embedded in a document’s head element using the <style> tag. <script> </script> tag is used for Javascript.

3. The ________________ directive allows style sheets to be grouped and joined together, though some might wonder what the value of this function is given what linked styles provide.
a) <head>
b) <style>
c) <script>
d) @import
View Answer

Answer: d
Explanation: Within embedded <style> blocks, properties can be imported from an external file and expanded in place, similar to a macro. Importing can be used to include multiple style sheets. An imported style is defined within a <style> tag using @import followed optionally by a type value and a URL for the style sheet. <style> & <script> tag conatins CSS and Javascript content respectively. The metadata content is present in <head> tag.
advertisement
advertisement

4. Which of the following measurement defines a measurement relative to a font’s x-height?
a) ex
b) em
c) pt
d) px
View Answer

Answer: a
Explanation: Defines a measurement relative to the height of a font in em spaces. Because an em unit is equivalent to the size of a given font, if you assign a font to 12pt, each em unit would be 12pt, thus 2em would be 24pt.

5. Which of the following measurement defines measurement as a percentage?
a) %
b) cm
c) em
d) in
View Answer

Answer: a
Explanation: Defines a measurement as a percentage. Percentages are denoted by a number followed by the % symbol and are always relative to another value such as length. Quite often they are used to specify some value relative to an inherited value from a parent element.
Note: Join free Sanfoundry classes at Telegram or Youtube

6. Which of the following property sets the font size of text?
a) text-size
b) font-size
c) size
d) text
View Answer

Answer: b
Explanation: Syntax:

font-size: length | percentage | larger | smaller | xx-small | x-small | 
small | medium | large | x-large | xx-larger | inherit

7. Which of the following property sets a variation of the specified or default font family?
a) height
b) font-weight
c) default
d) font-variant
View Answer

Answer: d
Explanation: Syntax:

advertisement
font-variant: normal | small-caps | inherit

The small-caps value sets text in smaller-size all capitals. The normal value would be used to override any inherited font-variant value. Font-weight is for increasing/decreasing weight of font. It takes values like normal, bold, lighter, and bolder.

advertisement

8. Which of the following property defines labels for a list of items?
a) list-style-type
b) list-style-image
c) list-style
d) list
View Answer

Answer: a
Explanation: Syntax:

list-style-type: disc | circle | square | decimal | decimal-leading-zero

list-style-image add graphical image to a list item. List-style sets all the properties for a list.

9. Which of the following property assigns a graphic image to a list item?
a) list-style-type
b) list-style-image
c) list-style
d) list
View Answer

Answer: b
Explanation: list-style-type defines labels for a list of item. List-style property set all the properties for a list. List-style-image assign image to a list item.
Syntax:

list-style-image: url(url of image) | none

10. Which of the following property sets the amount of spacing between letters?
a) space
b) line-height
c) letter-spacing
d) letter-space
View Answer

Answer: c
Explanation: letter-spacing property sets the amount of spacing between letters.
Syntax:

letter-spacing: length | normal | inherit

Length values can be set in various units (negative values are permitted) or to the default value normal.

Sanfoundry Global Education & Learning Series – CSS.

To practice all areas of CSS, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.