Test Series - css

Test Number 5/59

Q: ___________ describes CSS properties to manipulate the position of “ruby”, which are small annotations on top of or next to words, especially common in Chinese and Japanese.
A. align
B. ruby
C. lang
D. text-align
Solution: Align is used to align the content either left, right or center. Ruby describes CSS properties to manipulate the position of “ruby”, which are small annotations on top of or next to words, especially common in Chinese and Japanese. They are often used to give the pronunciation or meaning of difficult ideograms. Text-align is for aligning the text either left, right or in center.
Q: ___________ has a grammar but unlike traditional (X)HTML it is not defined with a document type definition.
A. CSS 1
B. CSS 2
C. CSS 2.1
D. CSS 3
Solution: CSS 2.1 has a grammar (www.w3.org/TR/CSS21/grammar.html) but unlike traditional (X)HTML it is not defined with a document type definition. Instead the CSS specification is a combination of prose and a grammar that could be used to build a simple parser.
Q: What will be the output of following code snippet?
h1 {color: red text-decoration: underline; font-style: italic;}
A. color: red, text-decoration: underline and font-style: italic all works
B. text-decoration: underline and font-style: italic works
C. color: red, text-decoration: underline works
D. only font-style: italic works
Solution: In this case, we should see the browser continue to parse the value of color as “red textdecoration:
underline” before it sees a closing semicolon. The font-style property that follows would then be used. Because the color property has an illegal value, it should be
ignored.
Q: What will be the output of below mentioned code snippet?

 h1 {color: "green";}
A. heading becomes green
B. heading becomes dark-green
C. error occors
D. nothings happen
Solution: Output of above code snippet won’t happen as the declaration syntax is wrong. The correct declaration is : h1 { color: green; } which will yeild an output. In CSS, we don’t write value in double quotes.
Q: Which of the following is the correct way to applying style to a document?
A. Use an external style sheet, either by importing it or by linking to it
B. Directly embed a document-wide style in the head element of the document
C. Set an inline style rule using the style attribute directly on an element
D. All of the mentioned
Solution: We can style the document using CSS in three different ways i.e embed, inline and external. In any way as mentioned, we can apply CSS. An inline CSS means applying styles rules directly to the element. In embed, we declare or write all the needed style in  tag in the head element of the document. Expect these two ways we can also use another way in which we can create an external style sheet and provide its link to the document.
Q: With, which tag you write the style rules directly within the document found
within the head of the document.
A.  tag is used to add javascript in the document.
Q: What does screen media type is used for?
A. For use with all devices
B. For use with handheld devices
C. For use with computer screens
D. For use with television-type devices
Solution: In CSS, media types are used for the compatibility of devices. There are four types of nedia types i.e all, print, screen and speech. Out of which screen media type is used for computer screens, tablets, smart-phones, etc.
Q: For Inline Style, we don’t need to reapply style information throughout the document and outside documents.
A. True
B. False
C. .
D. ..
Solution: In inline style, properties are confined with a particular element to which it is applied. It won’t be applied to other element of the same type. We need to reapply style information throughout the document whenever it is necessary.
Q: Inline style has the lowest priority
A. True
B. False
C. .
D. ..
Solution: Among inline, embed and external style ways, inline has the highest priority and it overrides the other.
Q: For External Style Sheets in some cases when @import is used, the browser may cause a rendering “flash” under slow loading conditions.
A. True
B. False
C. .
D. ..
Solution: External Style Sheets in some cases when @import is used the browser may cause a rendering “flash” under slow loading conditions.

You Have Score    /10