1. Which syntax is used to describe elements in CSS?
c) Both Protectors and Selectors
d) None of the mentioned
Explanation: CSS stylesheets have a very powerful syntax, known as selectors, for describing elements or sets of elements within a document.
2. What does the following code snippet mean?
a) Span child after log declaration
b) Specific span child of id greater than log
c) Span child less than log
d) Any span child of the element with id as log
Explanation: The above code snippet means that any span child of the element with id=”log”.
3. Which of the following is the ultiate element selection method?
4. Which of the following is the Web application equivalent to querySelectorAll()?
d) None of the mentioned
Explanation: Web applications based on jQuery use a portable, cross-browser equivalent to querySelectorAll() named $().
5. The C in CSS stands for
Explanation: The C in CSS stands for “cascading”. This term indicates that the style rules that apply to any given element in a document can come from a “cascade” of different sources.
6. The latest version of CSS is
Explanation: The latest version of CSS is CSS3.
7. Which of the following is an example of a Shortcut Property?
d) all of the mentioned
Explanation: All of the above mentioned properties are shortcut properties. For example, the font-family, font-size, font-style, and font-weight properties can all be set at once using a single font property with a compound value:
font: bold italic 24pt helvetica;
8. Which of the following is the default positioning elements with CSS?
d) none of the mentioned
Explanation: static is the default value and specifies that the element is positioned according to the normal flow of document content (for most Western languages, this is left to right and top to bottom).
9. Which property lays the element according to the normal flow?
Explanation: When the position property is set to relative, an element is laid out according to the normal flow, and its position is then adjusted relative to its position in the normal flow.
10. Which of the following property allows you to specify an element’s position with respect to the browser window?
Explanation: The fixed value allows you to specify an element’s position with respect to the browser window. Elements with fixed positioning are always visible and do not scroll with the rest of the document. Like absolutely positioned elements, fixed-position elements are independent of all others and are not part of the document flow.