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
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
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
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.
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
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
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.
6. Which of the following property sets the font size of text?
a) text-size
b) font-size
c) size
d) text
View Answer
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
Explanation: Syntax:
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.
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
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
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
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.
- Check CSS Books
- Apply for Computer Science Internship
- Practice MCA MCQs
- Check Computer Science Books
- Practice Computer Science MCQs