CSS 2015

1. Which of the following is used to select one paticular tag, rather than a group of tags?
Answers:
• Id selector
• Pseudo-class selector
• Class Selector
• Contextual selecto
2. With what character does a declaration block start and end with?
Answers:
• starts with { and ends with }
• starts with ( and ends with )
• starts with # and ends with .
• starts with " and ends with "
3. Which of the following places one or more images in the background of the element?
Answers:
• image-bg
• imagesbackground
• bgimage
• background-image
• background-img
4. Which of the following is true for the max-width property?
Answers:
• The max-width sets the width of the table border to another border.
• Set the maximum width of a paragraph with the following: p { max-width:full; }
• The max-width property does not include padding, borders, or margins.
5. What does the outline-offset property do?
Answers:
• Both of the other answers are correct.
• Draws an outline beyond the border edge.
• Offsets an outline
6. Which of the following is true about inline styles?
Answers:
• They will be overridden by a default value.
• They will be overridden by a style defined inside the <head> tag.
• They will be overridden by an external style sheet.
• They will override a style defined inside the <head> tag, in an external style sheet or in a browser (a default value).
7. In which direction are elements floated?
Answers:
• Circularly
• All of these
• Vertically
• Horizontally
8. The pseudo selector ":nth-child(2n)" can also be written as:
Answers:
• :nth-child(even)
• :nth-child(everysecond)
• :nth-child(second)
• :nth-child(odd)
9. Which is the correct shorthand to specify padding: 10 pixels at the top, 7 pixels at the bottom, 25 pixels at the right and 2 pixels to the left?
Answers:
• padding: 25px 10px 7px 2px
• padding: 10px 7px 25px 2px
• padding <10px 25px 7px 2px>
• padding:10px 25px 7px 2px
10. The text-align property is used to set the ______ alignment of a text.
Answers:
• neither
• horizontal
• vertical
• both
11. Which value of the "text-transform" property transforms the first character in each word to uppercase?
Answers:
• uppercase
• none
• lowercase
• capitalize
12. What is NOT a correct value of background-position property?
Answers:
• right bottom
• 15% 20%
• left top
• 10px 10px
• middle
13. If an image is floated to the right, where does a following text flow?
Answers:
• around it, to the left
• around it, to the right
• around it, to the top
• around it, to the bottom
14. Which of the following css declarations will create italicized text?
Answers:
• {font-weight: italic;}
• {text-decoration: italic;}
• {text-style: italic;}
• {font-style: italic;}
15. Which property specifies spacing behavior between text characters?
Answers:
• letter-spacing
• font-spacing
• text-transform
• text-letter-spacing
16. What is true about image sprites?
Answers:
• Both of these
• It is a collection of images put into a single image.
• Using image sprites will reduce the number of server requests.
17. In order to have a block element stay in the same position in the viewport regardless of where the user scrolls, what should the "position" property be set to?
Answers:
• relative
• absolute
• fixed
• static
• inherit
18. What property is used to specify the indentation of the first line of a text?
Answers:
• text-decorate
• text-format-indentation
• text-transform
• text-indentation
19. In this code, where will the <p> element be displayed?  <body> <div style="position:relative"> <p style="position:absolute; bottom:0;"> </p> </div> </body>
Answers:
• At the bottom of the child element
• At the bottom of the <div> element
• Wherever it appears inline in the document
• At the bottom of the browser window
20. How do you hide an element, but have it still take up space and affect the layout?
Answers:
• visibility: hidden;
• display: none;
• visibile: zero;
• show: hidden;
• visibility: none;
21. What is the scale for opacity from least to most?
Answers:
• 1 - 100
• 1 - 10
• 0 - 100
• 0 - 1
22. Is a # required before colors in CSS?
Answers:
• No, unless you are using more than ten colors
• No, it is optional
• No, only when specifying colors as hexadecimal values.
• Yes, always
23. Which operator is used for pseudo classes?
Answers:
• : (colon)
• [space]
• < (less than)
• > (greater than)
• :: (double colon)
24. The caption-side property specifies the placement of a table caption.  Which of the following is NOT a valid value?
Answers:
• bottom
• top
• side
• inherit
25. What is text-align set to each line when text is stretched so that every line has equal width, and the left and right margins are straight?
Answers:
• center
• Both justify and center
• justify
26. What is "inline" for the CSS display property?
Answers:
• It displays the element in sequence, line by line.
• It displays a line between each element.
• It displays a line between each lines of text.
• An inline element has no line break before or after it, and it tolerates HTML elements next to it.
27. What does "padding:15px 20px 25px" mean?
Answers:
• - top padding is 15px - bottom padding is 20px - right and left paddings are 25px
• - bottom padding is 15px - right and left paddings are 20px - top padding is 25px
• - right and left paddings are 15px - top padding is 20px - bottom padding is 25px
• - right padding is 15px - top and bottom paddings are 20px - left padding is 25px
• - top padding is 15px - right and left paddings are 20px - bottom padding is 25px
28. In this CSS code, what element is the property?  table {color: red;}
Answers:
• table
• blue
• color
• None of these
29. By default, the background-image property repeats an image...
Answers:
• no-repeat
• horizontally
• vertically
• both horizontally and vertically
30. What is the syntax for a customized cursor?
Answers:
• Selector-cursor{style:value}
• Selector{value:property}
• Selector {cursor:value}
• Selector {value:cursor}
• Selector-style {property:value}
31. display:none hides an element, and it will...
Answers:
• still take up space. The element will be hidden, and the page will be displayed as if the element is NOT there
• still take up space. The element will be hidden, and the page will be displayed as if the element is STILL there
• not take up any space. The element will be hidden, and the page will be displayed as the element is NOT there
• not take up any space. The element will be hidden, and the page will be displayed as if the element is STILL there
32. Which of the following specifies the type of list-item marker?
Answers:
• list-style-marker
• list-marker
• list-style-all
• list-style-type
33. Given the following css rule, where would the style apply?  #content table tr td ul li a {font-weight:bold;}
Answers:
• Text inside of a list inside of a table inside of something named content
• A link with an id of "content"
• Links inside of a list inside of a table inside of an element with an id of 'content'
• A list inside of a table inside of something named content
34. How do you target the submit button for the <form id="example">?
Answers:
• .example input[type:submit]
• #example input.submit
• .example input[type="submit"]
• #example input[type:submit]
• #example input[type="submit"]
35. Given .class {  padding: 20px 10px; }, in what order do padding values apply?
Answers:
• left, right
• top, bottom
• top & left, right & bottom
• top & bottom, left & right
36. Which of the following applies a different background color for odd numbered rows in a given table?
Answers:
• td:nth-child(odd)
• th:nth-child(odd)
• col:nth-child(odd)
• tr:nth-child(odd)
37. What's the name of the technique when multiple images used throughout a website are combined into a background image to be selected with the background-position property?
Answers:
• CSS Image Mix
• CSS Image Sprites
• CSS Image Code
• CSS Image Group
38. What does the * stand for in CSS?
Answers:
• Universal Selector
• Major Selector
• Class Selector
• Master Selector
• Attribute Selector
39. Where is the margin property located in the CSS box model?
Answers:
• Inside the box
• Outside the box
• It could be inside or outside the box, depending on where you place it in your code
40. Which declaration removes bullets from a navigation list?
Answers:
• list-style-type:no bullets
• list-style-none
• list-style-type:none
• list-bullets:none
41. What are the differences between "display:none" and "visibility:hidden" code?
Answers:
• "visibility:hidden" hides the element and remove it's placeholder, "display:none" hides the element but keeps it's place blank.
• "display:none" hides the element and remove it's placeholder, "visibility:hidden" hides the element but keeps it's place blank.
• Both are same
42. What does image sprite do in CSS?
Answers:
• It specify a link to an image.
• It is a way to open one image at a time within the html.
• It specify the image style.
• It is a style of an image in different page of the website.
• It is a collection of images put into a single image.
43. You have three blocks of code that share property values. Which of the following ways is the most efficient?
Answers:
• .one .two .three { property: value; }
• .one, .two, .three { property: value; }
• .one / .two / .three { property: value; }
• .one { property: value; } .two { property: value; } .three { property: value; }
44. What is the correct order if you want a div with left margin of 10, right margin of 2, top margin of 5, and bottom margin of 0?
Answers:
• div {margin: 5px 0 10px 2px}
• div {margin: 5px 2px 0 10px}
• div {margin: 10px 2px 5px 0}
• div {margin: 10px 5px 2px 0}
45. Of the following elements, which will be frontmost, on the top of the stack using z-index?
Answers:
• Element with z-index of 2
• Element with z-index of 9
• Element with z-index of 1
• Element with z-index of 6
46. What HTML tag can you use to import a style sheet into a document?
Answers:
• Use the HTML <link /> tag, like this: <link rel='stylesheet' type='text/css' href='styles.css' /> .
• Use the HTML <link /> tag, like this: <link rel='style' type='text/css' href='styles.css' /> .
• You can use '@import' sentence.
47. In CSS3, which property is used to make sure a given element has a width of at least a set value?
Answers:
• min-width
• minimum-width
• max-width
• margin-width
• offset-width
48. What does XSL, another style sheet language for XHTML, stand for?
Answers:
• Extensible Stylesheet Language
• Extensible Sheet Logo
• Extraordinary Stylesheet Language
• Extended Styles Language
49. If the name of a font family is more than one word, it must be in quotation marks.
Answers:
• True
• False
50. What is the CSS syntax for changing the default cursor to a pointing finger?
Answers:
• cursor: pointer;
• cursor: cursor;
• cursor: finger;
• cursor: hover;
• cursor: hand;
51. What of the following is the correct syntax in CSS?
Answers:
• Selector-declarations {Value: Property;}
• style {Property: Value;}
• rules {Property: Value : Type;}
• Selector {Value: Property;}
• Selector {Property: Value;}
52. What does the list-style-position property do?
Answers:
• It specifies the orientation of a list.
• It specifies the font style of a list item.
• It specifies if the list-item markers should appear inside or outside the content flow.
• It specifies the color of a list item in a fixed position.
53. Which of the following is the correct syntax for a pseudo-class?
Answers:
• pseudo-class { ... }
• selector->pseudo-class { ... }
• selector.pseudo-class { ... }
• selector:pseudo-class { ... }
54. Which of the following will remove the default underline under the link with an id of "content"?
Answers:
• a#content {text-decoration:none;}
• #content a {underline:none;}
• a {underline:none;}
• a {content text-decoration:underline;}
55. Which declaration can be used to have a block element always displays scrollbars?
Answers:
• {overflow:auto}
• {overflow:on}
• {scroll:on}
• {overflow:always}
• {overflow:scroll}
56. When adjusting a CSS sprite, which property do you use?
Answers:
• color
• background-position
• font-style
• text-indent
57. Which property is used to set whether table borders are collapsed into a single border or detached as in standard HTML?
Answers:
• border-separation
• border-collapse
• border
• border-spacing
58. What css selector selects the input element which has focus?
Answers:
• input:focus
• a:input
• a:focus
• input+focus
59. A definition list has two types of items: the term and the description. Which of the following is NOT a valid definition-related tag set?
Answers:
• <dl></dl>
• <dd></dd>
• <dt></dt>
• <do></do>
60. If an image is floated to the right, the following text flows around it...
Answers:
• to the bottom
• to the top
• to the center
• to the right
• to the left
61. What css selector selects all <div> elements and all <p> elements?
Answers:
• div;;p
• div,p
• div:p
• div:;p
62. On which position value does the z-index property work?
Answers:
• position: absolute;
• position: relative;
• all of the answers
• position: fixed;
63. Which declaration will make each word in an element start with a uppercase letter?
Answers:
• text-transform: capitalize;
• type-transform: capitalize;
• text-transform: capitalize first;
• type-style: capitalize;
64. Which pseudo class is used in conjunction with an ID when the pound symbol in the current URL matches that ID. For example, if you are at URL www.yoursite.com/#home
Answers:
• #home:indeterminate
• #home:target
• #home:hash
• #home:enabled
65. To specify the style for a list, use the _________ property.
Answers:
• Both ol-style and ul-style depending on the list type.
• listStyle
• list-style
• ol-style
• ul-style
66. In the CSS box model, where is the margin located?
Answers:
• Between the padding and the box border
• Immediately within the box border
• None of these
• Immediately outside the box border
67. Which of the following produces a black border that is 1-pixel thick and dashed?
Answers:
• dashed-border: black 1px
• border-dashed: 1px #000000
• border: 1px dotted black
• border-color: black; border-style: 1px dashed
• border: 1px dashed #000
68. Which style does the following rule apply to?  div.wrapper h2 {      font-size: 18px;       margin-top: 0px; }
Answers:
• None of these
• h2 heading inside element div of any class
• h2 heading inside element div of id wrapper
• h2 heading inside element div of class wrapper
69. What does minifying CSS do?
Answers:
• gzips the file
• combines it with HTML code to integrate it and make it faster
• compresses the code by removing whitespace, which is not needed
• compiles it completely
70. An ____ style loses many of the advantages of style sheets by mixing content with presentation.
Answers:
• Inline
• External
• Internal
71. What css selector selects every element that is not a <p> element?
Answers:
• :notp
• :not(p)
• :no-p
• :all-but-p
72. Which property is used to horizontally align the text in the table?
Answers:
• vertical-align
• horizontal-align
• text-align
73. Which style will cause all links to "http://www.smarterer.com" to be blue?
Answers:
• a[link="http://www.smarterer.com"] { color: blue; }
• a[href="smarterer.com"] { color: #ff0000; }
• a[link="http://www.smarterer.com"] { color: #0000ff; }
• a[href="http://www.smarterer.com"] { color: blue; }
74. Which syntax does older versions of Internet Explorer use for transparency?
Answers:
• filter:alpha(opacity=x).
• opacity=x
• opacity:x
75. Which measurement can't be used to size text in CSS?
Answers:
• huge
• px
• em
• %
• pt
76. How do you apply multiple classes to an element?
Answers:
• <div class="[class1][class2]" ></div>
• <div class="class1 class2" ></div>
• This isn't possible in CSS.
• <div class="class1,class2" ></div>
• <div class="class1" class="class2" ></div>
77. If table {color: red;} is specified in a stylesheet, what happens to the table?
Answers:
• Padding appears red
• Table background is red
• Border around the table is red
• Text within it is red
78. How can you override css cascade priority and force a particular css rule to apply?
Answers:
• All of these
• p { color:red !important; }
• p { color:red force; }
• p { color:red important; }
79. Which of the following is true about vertical-align property?
Answers:
• To vertically align an image: img { vertical-align:text-top; }
• It sets the vertical alignment of an the entire webpage.
• It sets the vertical alignment of an element.
80. How do you remove browser default margin and padding settings?
Answers:
• Set margin and padding to custom
• Set margin and padding to auto
• Set margin and padding to css
• Set margin and padding to 0
81. Which is the correct syntax for referring to a pseudo-class?
Answers:
• #hover
• .hover
• :hover
• hover
82. Block elements can be aligned to center by setting the left and right...
Answers:
• margins to none
• margins to 50%
• margins to auto
• margins to center
83. Every CSS style definition has two components. What are they?
Answers:
• selection, properties
• copy, properties
• section, id
• selector, properties
84. Which of the following selects all unvisited links?
Answers:
• "link"
• :link
• +link
• link
85. How do you set a paragraph to have a border of 5px in red color?
Answers:
• p { border-style:5px solid red; }
• paragraph { border:5px solid red; }
• p { border:5px; solid; red; }
• p { border:5px solid red; }
• paragraph { border-width:5 solid red; }
86. Which HTML tag is used to define an embedded style sheet?
Answers:
• <css>
• <style>
• <embed>
• <script>
87. What is the child selector in css?
Answers:
• #
• .
• >
• +
• ~
88. Normally, elements after a 'floated' element will flow around it. Which property can be used to avoid this?
Answers:
• the negative-float property
• the no-float property
• the clear property
89. If a block element might not have enough space to display all of its content, which property might you use to enable scrollbars if they're needed?
Answers:
• v-scrollbar: auto
• scrollbar: on
• overflow: auto
• show: force
• h-scrollbar: scroll
90. Which of the following properties can be used to add space outside an element's box?
Answers:
• padding
• None of these
• spacer
• margin
91. True or False : CSS class name starting with a number is supported by all browsers.
Answers:
• True
• False
92. Which of the following is true about border styles?
Answers:
• Borders must be on all 4 sides
• Borders must be equal weights on all 4 sides
• None of these
• Borders must be the same color on all 4 sides
93. Which of the following is NOT a valid image opacity rule?
Answers:
• opacity: 0.5;
• opacity: 1;
• opacity: 2.0;
• opacity: 0;
94. What css selctor Selects every <p> element that is the last child of its parent?
Answers:
• p:last-children
• p:last-parent-child
• p:last-child
• p:last-child-parent
95. What does the property text-align:center; do?
Answers:
• Aligns text in the center and places it at the top of the page
• Aligns text in vertical center of the page
• Aligns text to the center of the nearest image as a caption
• Aligns text in horizontal center of the containing element
96. With what characters are CSS declarations separated?
Answers:
• colon ( : )
• semicolon ( ; )
• space ( )
• hash ( # )
• period ( . )
97. What does the child selector (">") do?
Answers:
• Matches all descendants (recursively)
• None of these
• Matches elements that are a direct child of the parent match
• Matches any element
98. When using the background-color property with rgba(255, 0, 255, 0.5) what does the "a" refer to?
Answers:
• Opacity (Alpha channel)
• Black
• Grey
• This is incorrect syntax and will do nothing
99. In this CSS code, what element is the selector?  table {color: red;}
Answers:
• table
• color
• red
• None of these
100. What css selector selects all <p> elements that are contained inside of an element with an ID of 'content'?
Answers:
• #content 'p'
• #content <p>
• #content < p
• #content p
• #content [p]


101. An attribute selector allows you to select an element with a specific attribute. To select a <input type="submit"> you would use:
Answers:
• input-submit { }
• input[type=submit] { }
• input:type.submit { }
• input::submit { }
102. Identify the selector in the following rule: h1 { color: blue; }
Answers:
• color: blue
• h1
• color
• { }
• blue
103. What rule is generally used, for responsive web design, to target devices with different widths?
Answers:
• @type
• @media
• @screen
• @import
104. How do you hide an element and remove it from the document flow?
Answers:
• Add "visibility: invisible" to your style sheet rule.
• Add "display: none" to your style sheet rule.
• Add "visibility: hidden" to your style sheet rule.
• Add "display: hide" to your style sheet rule.
• Add "image: hide" to your style sheet rule.
105. With what characters are multiple fonts separated with?
Answers:
• dashes
• brackets
• commas
• periods
106. When using z-index which other property is required?
Answers:
• background
• list-style
• overflow
• float
• position
107. Which of the following sets all the border properties in one declaration?
Answers:
• border-css
• border
• border-main
• border-style
• border-all
108. How can you create responsive websites through css?
Answers:
• Referencing multiple external stylesheets with different type attributes for device MIME types.
• Use an @media query.
• None of these.
109. What is the correct pseudo-class for modifying only the first element of a selector?
Answers:
• :first-child
• :1st
• :first-of-type
• :first-element
110. What does the pseudo class last-child do?
Answers:
• selects the last element on the page
• targets the last element on the style sheet
• selects the last element in a targeted parent element.
111. Which of the following will apply a hex color of #445566 to each active link?
Answers:
• a {active-color: #445566;}
• a {color:#445566;}
• a:active {color:#445566;}
• a:active {text-color:#445566;}
112. What are the three methods for implementing a stylesheet?
Answers:
• Linked, Appended, and Embedded
• Internal, Embedded, and External
• Inline, Embedded, and External
• Direct call, Indirect call, and Embedded
113. What is the correct shorthand syntax for a border?
Answers:
• border: 1px solid #777;
• border: 1px 1px solid #777;
• border: 1px rounded #777;
• border: 1px solid #77;
114. Which line changes the background color of a link when a visitor hovers it?
Answers:
• a:link { background-color: #FF704D; }
• a:active { background-color: #FF704D; }
• a:hover { background-color: #FF704D; }
• a:hover { color: #FF704D; }
115. In CSS, the term "box model" is used when talking about?
Answers:
• design and layout
• shipping and receiving
• forms and fields
• html
116. Which of the following has the highest priority?
Answers:
• External style sheet
• Browser default
• Internal style sheet (in the head section)
• Inline style (inside an HTML element)
117. Which of the following is the correct syntax for using z-index?
Answers:
• img z-index:-1}
• img {z-index:-1;}
• img: {z index:-1;}
• img {z index -1;}
118. How will this display: margin: 10px 5px;
Answers:
• Top: 5px, right: 10px, bottom: 5px, left: 10px
• Bottom: 10px, right: 10px: top: 5px, left: 5px
• Top: 10px, right: 5px, bottom:10px, left:5px
• Top: 10px, left: 10px, bottom: 5px, right:5px
• Top: 10px, right: 10px, bottom: 5px, left: 5px
119. What attribute is NOT required when using the <link> tag?
Answers:
• type
• head
• rel
• href
120. Which of these examples of using the clear property are correct?
Answers:
• .text_line { clear:both; }
• .text_line { clear:all; }
• .text_line.clear;
121. How much space does an element take up within the document (on modern browsers) if it has "display: none" styling applied?
Answers:
• It will take up the minimum possible space.
• It will not take up any space.
• It will take up the maximum possible space.
122. Which of the following is the correct syntax for importing one style sheet into another?
Answers:
• import href="other.css";
• link import="other.css";
• style import="other.css";
• @import url("other.css");
123. Which of the following defines the boundary within the element box against which background-image positioning is calculated?
Answers:
• mailorigin
• bg-origin
• image-origin
• background-origin
124. To create a border of 3-pixel width, which css declaration would you use?
Answers:
• border width: 3;
• border-style: 3px;
• border-size: 3px;
• border-width: 3px;
125. Which of the following characters is used to begin a css declaration block?
Answers:
• {
• .
• (
• #
• None of these
126. #container {margin: 20px 30px 10px 50px} The margin-right value will be...
Answers:
• 30px
• 50px
• 20px
• 10px
127. What are the three methods for using style sheets with a web page?
Answers:
• Dreamweaver, GoLive or FrontPage
• Handcoded, Generated or WYSIWYG
• Inline, embedded or document level and external
• Save as .css extension, Save as .css3 extension, Save as .style extension
128. You can apply a style to a selector within a selector without affecting the same selector outside the parent selector.
Answers:
• False
• True
129. Which property controls the additional space between the selected element(s) border and its content?
Answers:
• padding
• spacer
• none of these
• margin
130. Which of these has the highest priority?
Answers:
• inline style
• browser default value
• external style sheet
131. How do you specify 30% opacity in CSS (ignoring IE)?
Answers:
• opacity: 0.3
• opacity: 30%
• opacity: 0.7
• opacity: 70%
132. How would you hide an element using the display property?
Answers:
• display: block;
• display: none;
• display: hidden;
• display: 0;
• display: invisible;
133. Which of the following declarations would display a list without bullets?
Answers:
• list-type: none
• list-style-type: no
• list-style-type: nobullets
• list-style-type: none
134. By which of the following is a declaration terminated?
Answers:
• ;
• !
• ::
• //
135. Which side of the element with ID 'element' will have a 10px margin?  #element { margin: 0px 5px 10px 20px;}
Answers:
• right
• top
• bottom
• left
136. What selector is used to select all elements?
Answers:
• p
• head
• *
• body
• div
137. How do you set the text color in a css rule?
Answers:
• text-color:
• color:
• font-color:
138. Can web fonts be imported with .css files directly
Answers:
• Yes, by using @import url("fontname");
• No, web fonts can't be imported
• Web fonts can only be imported using the <link> tag
139. What is one way to center a fixed-width element (relative to its container)?
Answers:
• left-to-right: center;
• margin: 0 auto;
• float: middle;
• horizontal-align: middle;
140. Which attribute creates space between content and its container?
Answers:
• clear
• margin
• padding
• float
• stuffing
141. Which of the following is correct to transform text into uppercase?
Answers:
• h1 {text-transform:upper;}
• h1 {text:uppercase;}
• h1 {text-transform:uppercase;}
• h1 {text-style:uppercase;}
142. Which of the following selects the active link?
Answers:
• #:active
• all=active
• :active
• active
143. Which of the following sets the stack order of a positioned element?
Answers:
• All of these
• z-index
• ar-index
• s-index
144. Which of the following elements takes up the full width available, and has a line break before and after it?
Answers:
• Square Element
• Box Element
• Side Element
• Block element
145. What is the correct CSS syntax for making all the <p> elements bold?
Answers:
• p { font: bold; }
• p { font-weight: 400; }
• p { font-weight: strong; }
• <p style="text-size: strong">
• p { font-weight: bold; }
146. Which css rule will make an element with an id of "box" invisible?
Answers:
• #box {visibility:hidden}
• #box {visibility:invisible}
• #box {invisible:true}
• box {visibility: visible}
147. What is the difference between margin and padding?
Answers:
• There is no difference they both do the same thing.
• Margin is for creating space between text and padding is for making sure elements do not collide.
• Padding is on the outside of block elements while margin is on the inside.
• Margin is for absolute positioning and padding is for fixed positioning.
• Margin is on the outside of block elements while padding is on the inside.
148. Which of the following units of measurement can be used when creating a margin?
Answers:
• em
• pt
• All of these
• px
149. Which of the following will set h1 to 16 pixels, bold, and underline?
Answers:
• #h1 {font-size: 16px} {font-weight: bold} {text-decoration: underline}
• h1 {font-size: 16px; font-weight: bold; text-decoration: underline;}
• h1 {font-size: 18px; font-weight: bold; text-decoration: underline;}
• h1 {font-size: 16px; font-weight: bold; text: underline;}
150. How can you assign a higher specificity to a property value?
Answers:
• no-override: body { background: blue; }
• body:important { background: blue; }
• body { background: blue !important; }
• body { /* background: blue; */ }
151. Which of the following removes the bullet from an unordered list?
Answers:
• style-type: none;
• list: none;
• list-style-type: none;
152. Which of the following will create a box with a 2 pixel border on the top, 1 pixel border on the bottom, and no other borders?
Answers:
• #box {border: 2px, 0px, 1px, 0px;}
• #box {border: 0px, 0px, 1px, 2px;}
• #box {border: 2px, 1px, 0px, 0px;}
• #box {border: 0px, 2px, 1px, 0px;}
153. Which of the following applies a 2D or 3D transformation to an element?
Answers:
• 3d-transform
• d-transform
• 2d-transform
• transform
154. Which of these can be used to apply style rules to elements in a document?
Answers:
• Inline styles.
• All of these
• Externally linked stylesheets.
• Embedded stylesheets.
155. How can you add a comment to a stylesheet?
Answers:
• Enclose comment between opening and closing comment markers as follows: /* and */
• Enclose comment between opening and closing comment markers as follows: <? and ?>
• Enclose comment between opening and closing comment markers as follows: <!-- and -->
• Enclose comment between opening and closing comment markers as follows: # and #
156. Selects all elements with class="intro"
Answers:
• <intro>
• #intro
• =intro
• .intro
157. Which of the following sets all the properties for a list in one declaration?
Answers:
• list-main
• list-all
• list-style
• list-css
158. Which value is used to define a dashed border?
Answers:
• dashed
• dotted
• dashing
159. What is a CSS rule?
Answers:
• Main markup language for creating web pages and other information.
• HyperText Markup Language
• Statements that tell the web browser how to render certain element or elements on the page.
• Statements that tell the users computer where to go and what to do.
• Statements that tell the server what to do.
160. Which of the following is correct to transform text to lowercase?
Answers:
• p {text:lower;}
• p {text-style:lower;}
• p {text-transform:lowercase;}
• p {text-case:lower;}
• p {text-transform:lower;}
161. Which of the following will set Verdana as the entire page's font type?
Answers:
• body {font-family: Verdana;}
• font {Verdana;}
• body {font-type: Verdana;}
• page {font-family: Verdana;}
162. What is CSS valid syntax for setting the margin value to 0?
Answers:
• margin-all: 0;
• margin: 0;
• margin: 0 0 0 0 px;
• margin; 0;
163. Which of the following code elements will ensure that all images have no border?
Answers:
• #img { border: none; }
• #img { noborder; }
• img { noborder; }
• img { border: none; }
• img { border: noborder; }
164. Which css property can be used to display text with all uppercase, all lowercase, or with forced first-letter capitalization?
Answers:
• text-capital
• text-transform
• text-smaller
• text-styles
165. The CSS3 property for transparency is...
Answers:
• transparency
• opacity
• transparency %
• see-through %
166. Which of the following always refers to text color?
Answers:
• text-color`
• color
• hue
• font-color
167. Which of the following pseudo-elements are invalid?
Answers:
• ;last-paragraph
• :before
• :after
• ::first-line
• ::first-letter
168. Which are the two main parts of a CSS rule?
Answers:
• Only Selector
• Design and Definition
• Selector and Declaration
• Selector and Example
169. What css selector selects the document’s root element
Answers:
• :main-root
• :root-file
• :root
• :root-level
170. What property can be used to turn everything into uppercase or lowercase letters, or capitalize the first letter of each word?
Answers:
• text-transform
• all-text
• capitalize
• transformation
171. Which answer is equivalent to this: h1 { font-family: sans-serif; } h2 { font-family: sans-serif; } h3 { font-family: sans-serif; }
Answers:
• h1, h2, h3 { font-family: sans-serif; }
• h1 h2 h3 { font-family: sans-serif; }
• h* { font-family: sans-serif; }
• None of these
172. What property is used to a set minimum height for an element?
Answers:
• minimum-height
• m-heights
• min: height
• min-height
173. What does the property font-family do?
Answers:
• Specifies the font colors
• Tells you about the relatives of fonts
• Specifies the font size
• Specifies which font to use
174. With these specifications, how will the paddings appear in browser?   padding: 6px 3px 0px 3px;
Answers:
• top: 0px, right: 6px, bottom: 3px, left: 6px
• top: 6px, right: 3px, bottom: 0px, left: 3px,
• top: 6px, right: browser default, bottom: 0px, left: 3px
• top: 6px, right: 0px, bottom: 0px, left: 3px
• top: 0px, right: 6px, bottom: 0px, left: 3px
175. On which side will there be a 20px padding if this is the specified:          padding: 30px 15px 20px 10px;
Answers:
• left
• top
• bottom
• right
176. Which  property specifies the spacing between lines?
Answers:
• line-height
• line-x
• lineHeight
• textHeight
• height
177. What css selector Insert content before every <p> element
Answers:
• p:before
• P`before
• before=p
• p<before>
178. Which HTML tag is used to define an internal style sheet?
Answers:
• <css>
• <style>
• <link>
• <script>
179. In margin: 10px 20px 40px 30px; what will be the bottom margin?
Answers:
• 40px
• 0
• 10px
• 20px
• 30px
180. Which of the following is an example of using group selectors?
Answers:
• group(h1, h2, p) { color:green;}
• h1, h2, p { color:green;}
• selector(h1, h2, p) { color:green;}
• [h1, h2, p] { color:green;}
181. True or False: Hexadecimal color values are supported in all major browsers.
Answers:
• False
• True
182. Which answer best describes the following statement? <div style="text-align:center; font-size: 14px;"></div>
Answers:
• Internal CSS
• Smart CSS
• Inline CSS
• External CSS
183. What color does this hexadecimal code represent: #000?
Answers:
• black
• opaque
• white
• gray
184. How do you display hyperlinks without an underline?
Answers:
• a {text-decoration:no underline}
• a {text-decoration:none}
• a {decoration:no underline}
• a {underline:none}
• a {decoration: no-underline}
185. Which of the following css declarations will create bold text?
Answers:
• {font-weight: bold;}
• {text: bold;}
• {text-weight: bold;}
• {font: bold;}
186. Which of the following is NOT a valid technique for applying styles to a document?
Answers:
• internal styles
• exceptional styles
• inline styles
• external styles
187. What is the correct method of changing text color?
Answers:
• {color:#000000;}
• {font-color:#000000;}
• {text:#000000;}
• {text-color:#000000;}
188. What is the main difference between styling a <span> and a <div> element?
Answers:
• There is none. They can be styled with the same parameters in mind.
• <span> is an inline element by default, while <div> is a block element.
• You cannot use class inside a <span> tag, only id.
• A <div> is a child-element of <span>, while <span> can't be a child of <div>.
189. Is :focus a pseudo-class?
Answers:
• No
• Yes
190. What property changes the text color of an element?
Answers:
• color
• text-color
• fore-color
• foreground-color
191. Which of the following is NOT a CSS font property?
Answers:
• font-size
• font
• font-invariant
• font-family
• font-style
192. Which of the following css declarations would style hyperlinks using sans-serif fonts?
Answers:
• a:link {font-family: "times new roman", serif;}
• a:link {font-family: "lucida sans unicode", sans-serif;}
• body: font-family: "lucida sans unicode", sans-serif
• paragraph {font-family: "lucida sans unicode", sans-serif;}
193. What is the correct selector format for ID elements in CSS, where id_name is unique ID name to be formatted?
Answers:
• #id_name { }
• if id=id_name then { }
• /* idname { } */
• .id_name { }
194. How would you define class 'myclass' that sets the width of an element to 640px and the height to 480px ?
Answers:
• .myclass {width: 640px; height: 480px;}
• myclass.class {width: 640px; height: 480px;}
• .myclass {width: 480px; height: 640px;}
• myclass {width: 640px; height: 480px;}
• class.myclass {width: 640px; height: 480px;}
195. Internet Explorer supports the fixed value only if...
Answers:
• !DOCTYPE is specified.
• header is specified.
• !DOCTYPE is not specified.
196. Setting the left and right margins to auto specifies that they should split the available margin equally, resulting in...
Answers:
• an element to the left side
• a centered element
• an element to the left of center
• an element to the right side
• an element to the right of center
197. How do you designate an inline style?
Answers:
• style = " "
• src = " "
• css = " "
• href = " "
• inline = " "
198. What does the float property do?
Answers:
• Aligns HTML elements to the right or left while allowing content to flow around it
• Allows web designers to overlap elements or to stack them on top of each other
• Allows users to drag and drop images to another location on the page
199. What can CSS selectors look for?
Answers:
• certain HTML tags
• all of these
• hovered or clicked objects
• certain classes and ids
• certain objects inside of other certain objects
200. What is the difference between ID and Class?
Answers:
• Classes have browser default values, ID's don't
• You can use multiple classes on the same element, but you can't do that with ID's
• You can use multiple ID's on the same element, but you can't do that with classes
• ID's have browser default values, classes don't

201. Which of the following CSS3 properties is used to round the corners of elements?
Answers:
• rounded-corners
• border-curve
• border-radius
202. What property is used to a set maximum height for an element?
Answers:
• max: height
• m-height
• max-height
• maximum-height
203. Which of the following will set the entire page background color?
Answers:
• #body {background-color:#FFFFFF;}
• body background {color:#FFFFFF;}
• body {background-color:#FFFFFF;}
• body {color:#FFFFFF;}
204. In which example below will all HTML elements with class="master" will be center-aligned?
Answers:
• master -align:center;}
• #master{text-align:center;}
• master:center
• .master {text-align:center;}
• .center {text-:master;}
205. Which of the following defines the tiling pattern for one or more background images?
Answers:
• background tile
• background-repeat
• background-x
• backround-y
206. When does aligning a block element have no effect?
Answers:
• when it's width is set to 100%
• when it's width is set to 50%
207. The background image for a page can be set like this:
Answers:
• background-image:url=sand
• body {background-image:sand.gif';}
• body {background-:sand}
• body {background-image:url('sand.gif');}
208. Block elements can be centered by setting the left and right margins to:
Answers:
• auto
• 100%
• default
• random
209. Which CSS property controls the text size?
Answers:
• font-style
• font-size
• text-style
• text-size
210. Where in an HTML document is the correct place to refer to an external style sheet?
Answers:
• At the top of the document
• At the end of the document
• In the <body> section
• In the <head> section
211. A class is prefaced by what symbol?
Answers:
• #
• @
• <
• </
• .
212. To set the bottom border width...
Answers:
• border-bottom-width:15px;
• border--width:15px;
• border/bottom-width:15px;
• border-bottom"width":15px;
213. Which statement is true about the following markup? <img src="klematis.jpg" width="150" height="113" alt="klematis" style="opacity:0.4;filter:alpha(opacity=40)" />
Answers:
• This image will be completely hidden.
• This image will be partially transparent.
• This image will be partially clipped.
• This image will fade in slowly over time.
214. What is the best way to insert CSS styles across multiple HTML files?
Answers:
• Inline CSS
• Internal CSS
• External CSS
• Don't use CSS, use Google
215. Which HTML attribute is used to define inline styles?
Answers:
• font
• instyles
• style
• styles
• class
216. The id selector uses the id attribute of the HTML element, and is defined with a...
Answers:
• "#"
• "{ }"
• "d"
• :."
• "."
217. Is this a proper statement? body {    font-family: Arial, Helvetica, sans-serif;    color: #000;    background-color: #FFF; }
Answers:
• Yes
• No
218. What does the border-radius property do?
Answers:
• Creates square corners
• Creates colorful corners
• Controls the spacing in a table
• Creates rounded corners
219. Which CSS property contains the following attributes: normal, italic, oblique
Answers:
• font-format
• font-appearance
• font-weight
• font-intensity
• font-style
220. Hex colors are based off of what other web based color mode?
Answers:
• Indexed
• CMYK
• RGB
• Grayscale
221. What does background-origin property do?
Answers:
• It specifies the background text.
• It specifies the positioning area of the background images.
• It specifies the background color.
222. Which property is used to control the space between the border and content in a table?
Answers:
• padding
• align
• spacing
223. Which tag is used to link External Style Sheets?
Answers:
• <link>
• <ess>
• <external>
• <sheet>
224. Which answer best describes the following css rule? a {text-decoration:none;}
Answers:
• Paragraphs will have hidden text
• It's an anchor with no ship
• Links will be styled with no underlines
• It is invalid
225. Pseudo-elements can be combined with CSS classes.
Answers:
• True
• False
226. In CSS, it is possible to specify different padding for different sides?
Answers:
• Yes
• Only for images
• No
• Only for <P> tags
227. Which of the following is true for setting font type?
Answers:
• p ( font:"Times New Roman",Georgia,Serif; )
• p { font-style:"Times New Roman",Georgia,Serif; }
• p { font-type:"Times New Roman",Georgia,Serif; }
• p { font:"Times New Roman",Georgia,Serif; }
• p { font-family:"Times New Roman",Georgia,Serif; }
228. How do you add a background color?
Answers:
• div {bgcolor : red}
• div {background-color : red}
• div {background-color = red}
• div {bgcolor = red}
229. Which of the following statements is true given the following css and markup? a.red:visited {color:#FF0000;} <a class="red" href="css_syntax.asp">CSS Syntax</a>
Answers:
• The link in the example will turn red on mouseover
• If the link in the example has been visited, it will be displayed in red
• If the link in the example has been visited, it will not be displayed
• The link in the example will always be red
230. What does CSS stand for?
Answers:
• Cascading System Sheets
• Cascaded Style Sheets
• Creative Style Sheets
• Cascading Style Sheets
231. .center {text-align:center;} is an example of
Answers:
• an html tag
• the ID Selector
• the class Selector
232. What is the default file extension for a CSS style sheet?
Answers:
• .style
• .styles
• .main
• .css
233. Which is the correct CSS syntax?
Answers:
• {body;color:black}
• body:color=black
• body (color: black)
• body {color: black}
• {body:color=black(body}
234. Which of these is the correct format for specifying a color?
Answers:
• rgb(255,255,255)
• #ffffff
• #fff
• white
• All of the above
235. Which is the correct syntax for centering the text in the header?
Answers:
• h1 {text-align: centered;}
• h1 {font-align: centered;}
• p {text-align: center}
• h1 {text-align: center;}
236. How do you add a background color for all "<h1>" elements?
Answers:
• h1:all-childs { background-color: #FFFFFF; }
• h1.all { background-color: #FFFFFF; }
• h1 { bg-color: #FFFFFF; }
• h1 { background-color: #FFFFFF; }
237. What pseudo-class need to be used to style a link which has the mouse over it?
Answers:
• a:hover
• mouse over
• a:over
• a:link
238. Which of the following sets how a background image will be repeated?
Answers:
• repeat,background
• background-x-y
• repeat
• background-repeat+image
• background-repeat
239. What does the scale() method do?
Answers:
• It rotates the element
• It increases or decreases the size of element
• It adds color to the element
240. Where in an HTML document is the correct place to refer to an external style sheet?
Answers:
• In the <body>
• In the <head>
• In the <footer>
• In the HTTP headers
241. Which of the following properties is used to set a minimum width on an element?
Answers:
• hsize
• width
• min-width
• x-spacing
• size
242. Which is the correct way to write a comment in CSS?
Answers:
• /*This is a comment*/
• </ This is a comment />
• #This is a comment#
• //This is a comment
243. Which of these is the correct way to specify color?
Answers:
• h1 {color:#00ff00;}
• h2 {color:rgb(255,0,0);}
• All of these
• body {color:blue;}
244. Which syntax displays hyperlinks with an underline?
Answers:
• a {font: decoration: none}
• a {text-decoration: u}
• a {text-decoration: underline}
• a: font-decoration: underline
245. Colors in CSS can be specified by the following methods:
Answers:
• RGB colors
• Hexadecimal colors
• HSL colors
• HSLA colors
• All of these
246. How do you add a background color for all <h1> elements?
Answers:
• all:h1 { background-color: #FFF; }
• h1 { background-color: #FFF; }
• h1.all { background-color: #FFF;}
• h1:all { background-color: #FFF; }
• all.h1 { background-color: #FFF; }
247. What symbol do you use in CSS to call out to an ID?
Answers:
• id=""
• @
• .
• $
• #
248. What is the correct HTML for referring to an external style sheet?
Answers:
• <text/css" href="main.css">
• <link to ="stylesheet" type="text/css" href="main.css">
• <link rel="stylesheet" type="text/css" href="main.css">
• <link/"stylesheet" type="text/css" href="main.css">
249. Which CSS property controls the text size?
Answers:
• Time's Up!
• font-style
• text-size
• text-style
• size-font
• font-size
250. Where in an HTML document is the correct place to refer to an external style sheet?
Answers:
• In the <body> section
• In the <head> section
• Between the <style> tags
• At the end of the document
• At the top of the document
251. What css selector selects all elements?
Answers:
• ~
• !
• ^
• *
252. Which of the following increases or decreases the horizontal  space between characters?
Answers:
• kerning
• tracking
• letter-spacing
253. Which is the correct CSS syntax?
Answers:
• selector { property: value; }
• selector ( property:value )
• selector /property=value
• selector, property=value
• selector { property, value }
254. Dimension properties allow you to control:
Answers:
• the text size in an element
• the color of an element
• the height and width of an element
255. What do the height and width CSS dimension properties allow you to control?
Answers:
• the importance order of the cascade
• 2d and 3d dimensions
• the depth of nested divs
• the height and width of an element
256. The outline property is used to control:
Answers:
• width of outline
• style of outline
• color of outline
• all of these
257. Which of the following CSS declarations would change the border style?
Answers:
• border-style: solid;
• border-weight: solid;
• border-width: solid;
• borderstyle solid;
258. Which property is used to specify the kind of border to display?
Answers:
• border-design
• border-display
• border-kind
• border-style
259. What property alters an elements background color?
Answers:
• color
• bgcolor
• background-color
260. Who maintains CSS?
Answers:
• Mozilla
• W3C
• Google
• Apple
• Microsoft
261. Which tag is used to define an Internal Style Sheet?
Answers:
• <iss>
• <script>
• <style>
• <internal>
262. Which of these is not a vendor prefix?
Answers:
• -o-
• They are all vendor prefixes.
• -moz-
• -webkit-
• -ms-
263. The class selector is used to specify a style for:
Answers:
• a group of elements
• the <head> tag
• the <p > tag
• the <a> tag
264. What is the correct HTML for referring to an external style sheet?
Answers:
• <style src="mystyle.css">
• <link rel="stylesheet" type="text/css" href="mystyle.css">
• <stylesheet>mystyle.css</stylesheet>
265. What are the possible values of the property background-attachment?
Answers:
• scroll
• fixed
• Both scroll and fixed
266. Which HTML tag is used to define an internal style sheet?
Answers:
• <script>
• <style>
• <css>
267. Which element/pseudo-element pair can be used to create a mouseover effect on all links?
Answers:
• a:unvisited
• a:active
• a:hover
• a:link
• a:visited
268. CSS stands for
Answers:
• Common Style Sheets
• Cascading Style for Strings
• Common Style for Strings
• Cascading Style Sheets
• Community Specification of Styles
269. Which of the following characters is used to end a css declaration block?
Answers:
• >
• ]
• }
• None of these
• )
270. Which is the correct CSS syntax?
Answers:
• body:color=black
• body { color; red }
• body { color: red; }
• { body; color: black }
• { body: color=black(body }
271. Which property is used to change the background color?
Answers:
• backgroundcolor:
• background-color:
• color-bkgd:
• bgcolor:
• color-background:
272. Which of these is the correct CSS syntax for specifying the left margin of an element?
Answers:
• p {margin-left:20px;}
• {p = margin-left:20px}
• {p: margin-left:(20px)}
• {p: margin-left:20px;}
273. In an HTML document, where is the correct place to refer to an external CSS file?
Answers:
• In the <head> section
• At the end of the document
• In the <body> section
• In the <title> section
274. When does the link state a:hover occur?
Answers:
• When the user mouses over it
• When the user has visited it
• It is a normal link
• When the user clicks it
275. Which answer best describes the purpose of the following markup?  <link rel="stylesheet" href="style.css" type="text/css" />
Answers:
• To call an external stylesheet
• To call an internal stylesheet
• To request a sandwich
• It does nothing
276. Which of the following is NOT a web-safe font?
Answers:
• Zapfino
• Times New Roman
• Arial
• Verdana
• Georgia
277. Which of the following determines whether the text should be displayed as italics or regular text?
Answers:
• foont
• styles-font
• font-decoration
• font-style
• foont-styles
278. Which symbol is used to define an ID?
Answers:
• % (percent sign)
• $ (dollar sign)
• # (pound sign)
• ! (exclamation point)
• @ (the "at" symbol)
279. What does the background-color property do?
Answers:
• Specifies the background color of an element
• Specifies the background image
• Copies the background color from another element
• Returns "true" if the background color matches another element
280. What is the extension for an external style sheet?
Answers:
• .css
• .theme
• .sass
• .style
• .styles
281. The background color can be specified by:
Answers:
• a HEX, e.g., #00ff00
• a color name, e.g., yellow
• All of these
• an RGB value, e.g., rgb(255,0,255)
282. Which character, followed by the selector's name, is used for defining ID selectors?
Answers:
• #
• !
• %
• &
283. Which properties can be applied to first-line pseudo-element?
Answers:
• All of these
• background properties
• word-spacing
• vertical-align
• font properties
284. What should CSS be used for?
Answers:
• scripting
• just themes
• styling
• structure
285. .css files may be created using what software?
Answers:
• All of these, any text editor will do.
• Smultron
• BBEdit
• Text Mate
286. Which contemporary web browser(s) support CSS?
Answers:
• Internet Explorer
• Firefox
• All of these
• Chrome
287. Which CSS property controls the text size?
Answers:
• text-style
• font-size
• font-style
• text-size
288. The default value of the font-variant property is
Answers:
• small-caps
• different
• large-caps
• normal
289. What's the name of the layout technique that relies on CSS3 media queries to apply different styles based on the width of the browser window?
Answers:
• Fluid
• Responsive
• Elastic
• Liquid
290. Which property can be used to set the color of a text?
Answers:
• color
• color-spacing
• color-space
291. An id is prefaced by what symbol?
Answers:
• #
• <
• @
• </
• .
292. What is the correct HTML for referring to an external style sheet?
Answers:
• <style src="mystyle.css" />
• <stylesheet>mystyle.css</stylesheet />
• <link rel="stylesheet" type="text/css" href="mystyle.css">
293. Where in an HTML document is the correct place to refer to an external style sheet?
Answers:
• At the beginning of the document
• In the <head> section
• In the <body> section
• At the end of the document
294. What does CSS stand for?
Answers:
• Creative Style Sheets
• Computer Style Sheets
• Colorful Style Sheets
• Cascading Style Sheets
295. What does CSS stand for?
Answers:
• Cascading Style Sheets
• Common Style Syntax
• Creative Style Sheet
• Computer Style Sheets
296. Which configuration of the web elements in the page markup gives you great flexibility in the design of your site?
Answers:
• margins
• All are correct
• border
• padding
297. What is the correct HTML for referring to an external style sheet?
Answers:
• <link to ="stylesheet" type="text/css" href="main.css">
• <text/css" href="main.css">
• <link/"stylesheet" type="text/css" href="main.css">
• <link rel="stylesheet" type="text/css" href="main.css">
298. Which is the correct CSS syntax?
Answers:
• selector, property=value
• selector { property: value; }
• selector /property=value
• selector { property, value }
• selector ( property:value )
299. Where in an HTML document is the correct place to refer to an external style sheet?
Answers:
• In the HTTP headers
• In the <footer>
• In the <head>
• In the <body>
300. Where in an HTML document is the correct place to refer to an external style sheet?
Answers:
• At the end of the document
• At the top of the document
• In the <head> section
• Between the <style> tags

• In the <body> section

301. Which is the correct CSS syntax?
Answers:
• body (color: black)
• body:color=black
• {body;color:black}
• body {color: black}
• {body:color=black(body}
302. How do you add a background color for all <h1> elements?
Answers:
• h1 {background-color:#FFFFFF;}
• all.h1 {background-color:#FFFFFF;}
• h1.all {background-color:#FFFFFF;}
303. The id selector uses the id attribute of the HTML element, and is defined with a
Answers:
• "%"
• "#"
• "@"
• "_"
304. What does CSS stand for?
Answers:
• Cascading Style Sheets
• Cascading System Sheets
• Cascaded Style Sheets
• Creative Style Sheets
305. Where in an HTML document is the correct place to refer to an external style sheet?
Answers:
• At the end of the document
• In the <body> section
• In the <head> section
• At the top of the document
306. Which is the correct syntax of the background color for links?
Answers:
• a:link {background-color:#B2FF99;}
• a:link {background-color:@B2FF99;}
• a:link {background-color:!B2FF99;}
• a:link {background-color:%B2FF99;}
307. Which property can be used, along with a position property, to create an effect of layers?
Answers:
• x-index
• z-index
• a-b testing
• y-index
308. The _________ means an element that has the user's mouse pointer hovering over it.
Answers:
• a:hover
• a:visited
• a:link
309. Which CSS property can provide to add an effect when changing from one style to another,without using Flash animations or javascript?
Answers:
• transistor
• Associations
• Transitions
310. Which is the correct CSS syntax?
Answers:
• <p style="text-align:left or color:#00CC00"> This text is in left. </p>
• <p style="text-align:left;color:#00CC00"> This text is in left. </p>
• <p style="text-align:left and color:#00CC00"> This text is in left. </p>
• <p style="text-align:left,color:#00CC00"> This text is in left. </p>
311. Which property can be used to control the flow and formatting of text?
Answers:
• white-space
• red-space
• blue-space
• green-space
312. How do you make the text bold?
Answers:
• style:bold
• font-weight:bold
• font:b
313. Which of the following ways below is correct to write a CSS?
Answers:
• body {color: black}
• {body:color=black(body}
• {body;color:black}
• body:color=black
314. Negative values for transition-duration are treated as
Answers:
• 1
• 3
• 2
• 0
315. The ..................... specifies whether a border should be solid, dashed line, doted line, double line, groove etc.
Answers:
• border-layout
• border-decoration
• border-weight
• border-style
316. They must be define a border-style for the border to show up. Available terms:
Answers:
• thick
• thin
• All are correct
• medium
317. A ___________ property can help you to create more complex webpage layouts
Answers:
• x-index
• y-index
• z-index
318. The CSS list properties allow you to:
Answers:
• Set different list item markers for unordered lists
• Set an image as the list item marker
• Set different list item markers for ordered lists
• All are correct
319. What does CSS define in HTML?
Answers:
• How to made HTML elements
• How to display HTML elements
• How to send HTML elements
• How to save HTML elements
320. CSS colors are defined using a _________ notation for the combination of Red, Green, and Blue color values (RGB).
Answers:
• octadecimal
• pentadecimal
• hexadecimal
• nanodecimal
321. The <link> tag goes inside
Answers:
• body section
• The head section
• title section
322. How to apply the text-shadow around the text?
Answers:
• <all.p style="text-shadow:6px 6px 10px #FF0000 "> Text-shadow is of red color. </p>
• <p style="text-shadow:6px 6px 10px #FF0000 "> Text-shadow is of red color. </p>
• <p.all style="text-shadow:6px 6px 10px #FF0000 "> Text-shadow is of red color. </p>
323. Which states whether the text is underlined or not?
Answers:
• text-transform:
• text-shadow:
• text-spacing:
• text-decoration:
324. ...................... is used to import an external style sheet in a manner similar to the <link> element.
Answers:
• @import
• #insert
• @insert
• #import
325. The ________________ specifies whether a border should be solid, dashed line, doted line, double line, groove etc.
Answers:
• border-style
• border-weight
• border-decoration
• border-layout
326. In reality layers are often used in more dynamic ways:
Answers:
• Flying elements/banners on the page
• Menus that pop out when triggered
• Games where you move an object around
• All are correct
327. Which properties is used to change the case of the text?
Answers:
• text-shadow:
• text-transform:
• text-decoration:
• text-spacing:
328. Which is the correct syntax of css border?
Answers:
• .two { border->solid 6px #fff; position-> relative; z-index-> 1; }
• .two { border= solid 6px #fff; position=relative; z-index=1; }
• .two { border: solid 6px #fff position: relative z-index: 1
• .two { border: solid 6px #fff; position: relative; z-index: 1; }
329. True or False? With CSS, it's possible to customize the numbers that appear next to list items within <ol> elements.
Answers:
• True
• False
330. Which property can be used to decorate links by specifying no underline with the text?
Answers:
• text-decoration:line-through
• text-decoration:overline
• text-decoration:none
• text-decoration:underline
331. True or False: The universal selector, written "*", matches the name of any element type. It matches any single element in the document tree.
Answers:
• True
• False
332. The ___________ property allows to specify how much space appear between the content of an element and it's border.
Answers:
• Content-border
• Marking
• padding
• Spacing
333. __________ property is mostly used to remove underlines from links:
Answers:
• text-trans
• text-decoration
• text-transformation
334. The ___________ property allows you to control the shape or style of bullet point in the case of unordered lists, and the style of numbering characters in ordered list.
Answers:
• list-style-layout
• list-style-type
• list-type
• list-type-style
335. The text-decoration are:
Answers:
• text-decoration:line-through
• All are correct
• text-decoration:underline
• text-decoration:overline
336. Which is the correct CSS syntax?
Answers:
• <p"style=direction:inherit"> Possible values are ltr,rtl and inhert. </p>
• <p "style:direction=inherit"> Possible values are ltr,rtl and inhert. </p>
• <p style="direction:inherit"> Possible values are ltr,rtl and inhert. </p>
• <p "style=direction->inherit"> Possible values are ltr,rtl and inhert. </p>
337. The ____________ property allows to specify how much space appear between the content of an element and it's border.
Answers:
• Spacing
• Padding
• Marking
• Content-border
338. Which Represents a line that acts as a boundary?
Answers:
• Margin
• Border
• Padding
339. How do you make a list that lists its items with squares?
Answers:
• list-type: square
• list-style-type: square
• type: square
340. A ......... tag is used to specify that the browser is to fetch and use an external style sheet file
Answers:
• <sheet>
• <src>
• <link>
341. Which property can be used to specify all the list properties into a single expression?
Answers:
• ls-style
• None
• list-style
• liststyle
342. Which styles of border can be look in dotted?
Answers:
• border-style: outset;
• border-style: solid;
• border-style: dashed;
• border-style: dotted;
343. To create a layer all you need to do is assign the _______ attribute to your style
Answers:
• location
• direction
• position
344. Which property gets provide the increments or decrements the space between characters?
Answers:
• white-space
• letter-spacing
• direction
345. Hex values are written as 3 double digit numbers, starting with a
Answers:
• % sign
• @ sign
• # sign
• $ sign
346. CSS comments are inserted inside .
Answers:
• <!..................>
• /*..................*/
• All of them
• //...................//
347. Which is the correct syntax of the CSS?
Answers:
• <p style=font-size:"14pt"> Welcome to teds-india.</p>
• <p style="fontsize:14pt"> Welcome to teds-india.</p>
• <p "style=font-size:14pt"> Welcome to teds-india.</p>
• <p style="font-size:14pt"> Welcome to teds-india.</p>
348. What are the two components of every CSS style definition?
Answers:
• selector, properties
• copy, properties
• section, id
• selection, properties
349. What do the Greater Than sign > indicate in CSS
Answers:
• Selects the next element
• Selects the previous element
• Select the child of the element it follows
• Selects the last element
350. What is the correct way to set the color of hover links?
Answers:
• <style type="text/css"> a->hover {color:#000000} </style>
• <style type='text/css'> hover:a {color:#000000} </style>
• <style type="text/css"> a:hov {color:#000000} </style>
• <style type="text/css"> a:hover {color:#000000} </style>
351. The id selector is used to specify a style for
Answers:
• single, common element
• single, unique element
• multiple,unique element
• multiple,common element
352. p { width:220px; padding:10px; border:5px solid gray; margin:0px; } The total width of an element is calculated like this:
Answers:
• Total element width = width + right padding + right border + right margin
• Total element width = width + left padding + left border + left margin
• Total element width = width + left padding + right padding + left border + right border + left margin + right margin
353. Which concept uses the CSS from which implies that every HTML element is a box?
Answers:
• box model
• table model
• frame model
354. Which of the syntax is correct?
Answers:
• <div style="position:relative; font-size:50px; z-index:2;">LAYER 1</div>
• <div style="position:rel; font-size:50px; z-index:2;">LAYER 1</div>
• <div style="position:relative; font-size:50px; z-ind:2;">LAYER 1</div>
• <div style="position:relative; font-size:50px; yz-index:2;">LAYER 1</div>
355. Which part of the box, where text and images appear?
Answers:
• Border
• Padding
• Margin
• Content
356. The completion of a CSS Transition generates a corresponding
Answers:
• MOD Event
• OMD Event
• DOM Event
357. The correct example of class selector is .
Answers:
• #h2 type1 {color: #000000;}
• h2 type1 {color: #000000;}
• h2.type1 {color: #000000;}
• h2 #type1 {color: #000000;}
358. Pseudo classes may be applied to any element but are most commonly used with the __ element.
Answers:
• 'd'
• 'c'
• 'b'
• 'a'
359. Multiple font faces are separated by __________
Answers:
• Slash
• Semicolon
• Comma
• Dot
360. Which is the correct CSS syntax?
Answers:
• <p "style=direction:lttr"> This text is in left direction. </p>
• <p style="direction:lltr"> This text is in left direction. </p>
• <p style="direction:ltr"> This text is in left direction. </p>
• <p style:"direction=ltr"> This text is in left direction. </p>
361. The following syntax to set margin around a paragraph will make- p{margin:10px 2%}
Answers:
• Top margin will be 10px and other margins will be 2% of the total width
• Top and bottom margin will be 10px and left and right margin will be 2% of the total width.
• Left and right margin will be 10px and top and bottom margin will be 2% of the total height
• Left margin will be 10px and other margins will be 2% of the total width
362. The possible values of white-space are
Answers:
• <p style="white-space->normal"> Use of normal white-space. </p>
• <p style="white-space:normal"> Use of normal white-space. </p>
• <p style=white-space:"normal"> Use of normal white-space. </p>
• <p style="whitespace:normal"> Use of normal white-space. </p>
363. What property is used to specify the indentation of the first line of a text?
Answers:
• text-transform
• text-format-indentation
• text-indent
• text-decorate
364. What does a 'position: fixed;' declaration accomplish?
Answers:
• Fixes the element on its parent element
• Fixes the element relative to the browser's viewport
• Fixes the element on its child element
365. You have three blocks of markup that share property values. Which of the following ways is the most efficient?
Answers:
• .one { property: value; } .two { property: value; } .three { property: value; }
• .one .two .three { property: value; }
• .one / .two / .three { property: value; }
• .one, .two, .three { property: value; }
366. Which values can be used to set text direction?
Answers:
• mltr and mrtl
• ltr and rtl
• ttr and btr
• None
367. An outline is always placed __________ of the box
Answers:
• Inline
• backline
• Outline
368. The_________ means unvisited hyperlinks.
Answers:
• :visited
• :hover
• :active
• :link
369. Which two properties are the defaults when positioning a layer?
Answers:
• bottom, left
• top, right
• top, left
• bottom, right
370. The transition-duration property is in fact the only property required
Answers:
• as if transition-property is not supplied
• all properties that are able to undergo a transition
• All are correct
• to create a transition effect
371. What CSS selector selects all elements with a target attribute?
Answers:
• {target}
• `target
• /target/
• [target]
372. ____________ properties provide several options to place the content on the web page.
Answers:
• Margin
• Positioning
• Location
373. Which properties specifying whether to write the text from left to right or from right to left?
Answers:
• white-space
• letter-spacing
• none
• direction
374. A shorthand property for setting the four transition properties into a single property
Answers:
• transition
• transition-duration
• transition-property
• transition-delay
375. p.outset {border-style: outset; } In the code snippet above, which part represents the property?
Answers:
• border-style
• outset
• p
376. Fonts such as Times New Roman which have spaces in between must be wrapped inside ______
Answers:
• Curly Braces
• Quotation Mark
• Triangular Brackets
• Round Brackets
377. Which of the following elements will be matched by the CSS selector: div[class*="foo"] ?
Answers:
• <div class="baz-foo"> ... </div>
• <div class="foobar"> ... </div>
• All of these elements will be matched.
• <div class="foo"> ... </div>
378. Write the css selector for the 3rd list item within an ordered list.
Answers:
• li:nth-child(2n+1) { // do something }
• li:nth-child(3n) { // do something }
• li:nth-child(1n+2) { // do something }
• li:nth-child(3) { // do something }
• none of these
379. Which of the correct syntax css cursor code?
Answers:
• p { cursor: late } h4 { cursor: help } h5 { cursor: circlehair }
• p { cursor: wait } h4 { cursor: help } h5 { cursor: crosshair }
• p { cursor: reply } h4 { cursor: request } h5 { cursor: crosshair }
• p { cursor: wt } h4 { cursor: hp } h5 { cursor: crshair }
380. The First step of transition is
Answers:
• transition-duration
• transition-property
• transition-timing-function
• transition-delay
381. Which of the following elements will be matched by this CSS selector: div[class|="foo"] ?
Answers:
• <div class="foo"> ... </div>
• All of these elements will be matched.
• <div class="foo-bar foo-baz"> ... </div>
• <div class="foo-bar"> ... </div>
382. State whether True or False.  i) Any inline style sheet takes highest priority. ii) Any rule defined in <style> ...........................</style> tag will override rules defined in any external style sheet file.
Answers:
• i-True, ii-False
• i-True, ii-True
• i-False, ii-True
• i-False, ii-False
383. The possible values of white-space are
Answers:
• All are correct
• post
• pre
• normal(default value)
384. The_____________ property indicates whether a cell without any content should have a border displayed.
Answers:
• noborder-cells
• nocontent-cells
• empty-cells
• blank-cells
385. What CSS selector selects all elements with a target attribute?
Answers:
• [blank]
• [target_blank]
• [target]
• [target=_blank]
386. Which of the following color values is invalid?
Answers:
• transparent
• #abcdef
• rgb(1, 2, 3)
• #f00
• They're all valid.
387. The ................... property indicates whether a cell without any content should have a border displayed.
Answers:
• empty-cells
• blank-cells
• nocontent-cells
• noborder-cells
388. Which of the following code samples could be used to style a link whose URL begins with "https://sales."?
Answers:
• a:before { content: attr(href) "https://sales."; color: pink; }
• a { prepend: href='https://sales.'; color: pink; }
• a[href^='https://sales.'] { color: pink; }
• None of these, can't do that in CSS
389. Which of the following is true about the overflow property?
Answers:
• It specifies what happens if content overflows an element's box.
• It fixes the content in the table, if content overflows an element's box.
• The property values of the overflow properties include: visible, hidden, scroll, set and parent.
390. What does the following selector do: element[foo]
Answers:
• Matches any element without a foo attribute.
• Matches only elements without the foo attribute set.
• Matches any element with the foo attribute set.
• Matches only one element with the foo attribute set.
391. What does "Cascading" in CSS refer to?
Answers:
• The hierarchy of rules which determines how element properties are inherited
• Separates a document's content from its display rules
• The way elements of a document can "cascade" by being moved on the page
• A series of independent rules to control document style
392. The transition-duration property's initial value is 0, meaning that the transition is
Answers:
• simultaneous
• stantaneous
• instantaneous
393. Which list-style-type property renders a filled circle?
Answers:
• square
• circle
• disc
394. Which HTML tag can be used to connect one page with an external resource?
Answers:
• tree
• link
• node
• src
395. The Text spacing properties are
Answers:
• The letter-spacing property :
• The word-spacing property :
• All are correct
• The text-indent property :
396. Does using or not using a doctype (in HTML) affect how CSS styles HTML? (also known as standards mode vs quirks mode)
Answers:
• no, it's strictly for HTML
• yes, it affects HTML rendering and CSS styling
397. Which value of the border style property can look as though it were embedded in the canvas?
Answers:
• ridge
• hidden
• inset
• groove
398. Which type of border attribute can be used to have a unique look for each side of the border?
Answers:
• border-(location)
• border-(downwarddirection)
• border-(direction)
• border-(upwarddirection)
399. What is the border-spacing property?
Answers:
• It is the distance between the border and text in the table.
• It is the distance between 1 table to another table.
• It sets the distance between the borders of adjacent cells (only for the "separated borders" model).
• It is the distance between a table and text outside the table.
• It is the distance between the text in 1 cell to the text of adjacent cells.
400. What does the following mean: ul[id^="name-here"]
Answers:
• target any <ul> with an ID that starts with 'name-here'
• target any <ul> with an ID that ends with 'name-here'
• target any <ul> with an ID that contains 'name-here'
• target any <ul> with an ID similar to 'name-here'
401. True or False: The :first-line pseudo-element applies special styles to the contents of all but the first formatted line of a paragraph.
Answers:
• True
• False
402. Which properties allow specifying the formatting rules for the textual content on a Web page?
Answers:
• CSS textual
• CSS text
• CSS texting
• None
403. What colors are displayed when using six identical hexadecimal numbers to define color?
Answers:
• red, purple or blue
• white, gray or black
• yellow, orange or red
• red, green or blue
404. Which property is used to specify typefaces ?
Answers:
• font-name
• font-face
• font-type
• font-family
405. Which of the following properties is MOST likely to increase the amount of time it takes the browser to repaint?
Answers:
• box-shadow
• opacity
• border-width
• color
• font-weight
406. Which value will continue to display the text on the same line,until the BR element is specified?
Answers:
• post
• nowrap
• normal
• pre
407. Which of the following is invalid ?
Answers:
• .selector { background-image: url("image.png"); }
• .selector { content: url("image.png"); }
• .selector { background-image: url(image.png); }
• .selector { background-image: content("image.png"); }
• .selector { background: url("image.png"); }
408. In which position it will be calculated from the upper left corner of the parent layer?
Answers:
• position:absolute
• position:relative
409. What is absolute positioning?
Answers:
• When an element is positioned using only z-index positioning.
• When an element is positioned in a natural location in a page's flow.
• When an element is positioned relative to the first parent element that has a position other than static.
• When an element is positioned relative to the browser window.
410. A user can only view the border after specifying the
Answers:
• All are correct
• width
• styles
• color
411. The ______________ property describes how the intermediate values used during a transition will be calculated
Answers:
• transition-timing-function
• transition time
• transition duration
412. The value of letter-spacing property is
Answers:
• both normal or of length type
• either normal or of length type
• neither normal or of length type
413. Which aspect of CSS has some direct resemblance with the common regular expression syntax?
Answers:
• Pseudo classes
• Property names
• Property values
• Attribute selectors
• 3d translating
414. In which position will be calculated from that exact spot in the middle of your page where it was added?
Answers:
• position:relative
• position:absolute
415. Which part of the following selector does the browser parse first?  ul > li a[title="home"]
Answers:
• li
• ul
• >
• a[title="home"]
416. Which of the following selectors is the MOST efficient?
Answers:
• #menu ul .text { ... }
• ul#menu li a.text { ... }
• ul#menu .text { ... }
• #menu ul li a.text { ... }
• #menu .text { ... }
417. In CSS tables, the possible values for the caption-side property can have the following values.
Answers:
• left or right
• top, bottom, left or right
• top or bottom
• top, bottom, center, left or right
418. What does the CSS cue property do?
Answers:
• Specifies the frequency of the speaking voice
• Prompts the user to enter a voice command
• Specifies a sound to be played before and after the selected element
• Specifies a sound to be played as a background while an element's content is spoken
419. To style a link that ends in .html differently than a link that ends with another file extension you would use which code?
Answers:
• a[href&='.html']{color: purple;}
• a[href^='.html']{color: purple;}
• a[href$='.html']{color: purple;}
• a[href*='.html']{color: purple;}
420. Which value preserves the white spaces as specified in the content?
Answers:
• nowrap
• post
• normal
• pre
421. Which of the following is correct CSS syntex for using font property?
Answers:
• <p style="font: italic, bold, 15px;"> ................ </p>
• None of these
• <p style="font: italic bold 15px;"> ....................... </p>
• <p style="font-style: italic font-weight: bold font-size: 15px;"> ................... </p>
422. Which of the following declarations is incorrect?
Answers:
• table { direction: rtl; }
• table { display: table-column-grouped; }
• table { border-collapse: separate; }
• table { empty-cells: hide; }
• table { table-layout: fixed; }
423. Describes how the speed during a transition will be calculated. Default "ease"
Answers:
• transition-property
• transition-delay
• transition-timing-function
• transition-duration
424. A Group of font families with a similar look
Answers:
• font-size family
• inherit family
• font family
• generic family
425. Which property defines the distance between the nearest border edges of a marker and its associated principal box in an unordered list?
Answers:
• list-spacing
• marker-spacing
• list-offset
• marker-offset
426. A final property is the visibility property that will allow you to create
Answers:
• enable layers
• invisible layers
• visible layers
427. Which is not a valid pseudo class?
Answers:
• :root
• :valid
• :matches()
• :only-of-type
• :nth
428. The color names are defined in the HTML and CSS color specification (___ standard colors plus ____ more).
Answers:
• 18,126
• 17,124
• 15,123
• 16,125
429. In css border radius is not supported by Internet explorer version under
Answers:
• 9
• 10
• 8
• 7
• 6
430. To use inline styles you use the style attribute in the ............... tag
Answers:
• relevant tag
• link tag
• style tag
431. Which of the following declarations is incorrect?
Answers:
• ul { list-style-type: decimal-leading-zero; }
• ul { list-style-type: roman; }
• ul { list-style-type: circle; }
• ul { list-style-type: hiragana; }
• ul { list-style-type: lower-alpha; }
432. Which property is used to specify table borders in CSS?
Answers:
• border
• edge
• dimension
433. How do you add images to list items?
Answers:
• li-image-style: url(../images/bullet.gif);
• list-style-image: url(../images/bullet.gif);
• list-image: url(../images/bullet.gif);
• list-image-style: url(../images/bullet.gif);
434. Which of the following is invalid ?
Answers:
• .selector { content: url("image.png"); }
• .selector { background-image: content("image.png"); }
• .selector { background: url("image.png"); }
• .selector { background-image: url("image.png"); }
• .selector { background-image: url(image.png); }
435. Which of these is NOT a CSS pseudo-class?
Answers:
• a:blur
• p:after
• a:hover
• input:focus
• a:active
436. What is the order of precedence (highest to lowest) when applying styles?
Answers:
• external > inline > embedded
• inline > embedded > external
• inline > external > embedded
• embedded > external > inline
437. To ensure consistent behavior when the user resizes text, font-size should be declared in units of:
Answers:
• pt
• px
• em
• percent
438. Which of the following code samples could be used to style a link whose URL begins with "https://sales."?
Answers:
• a { prepend: href='https://sales.'; color: pink; }
• a[href^='https://sales.'] { color: pink; }
• None of these, can't do that in CSS
• a:before { content: attr(href) "https://sales."; color: pink; }
439. All monospace characters have the same...
Answers:
• height
• weight
• width
• decoration
440. What CSS syntax can be used to hide an image without affecting the documents layout?
Answers:
• visibility: hidden
• display: none
• visibility: invisible
• image: hide
• display: hide
441. Does using or not using a doctype (in HTML) affect how CSS styles HTML? (also known as standards mode vs quirks mode)
Answers:
• yes, it affects HTML rendering and CSS styling
• no, it's strictly for HTML
442. Which of the following is true about the overflow property?
Answers:
• It fixes the content in the table, if content overflows an element's box.
• It specifies what happens if content overflows an element's box.
• The property values of the overflow properties include: visible, hidden, scroll, set and parent.
443. Which version of CSS supports this tag   :nth-child   ?
Answers:
• CSS 2.1
• CSS 1
• CSS 2
• All versions
• CSS 3
444. What would the following do?  tr:nth-child(2n){background-color: red; }
Answers:
• Changes the background color of every even number table row to red
• Changes the text color of every even number table row to red
• Changes the background color of ONLY the second row in a table to red
• Is invalid CSS
• Changes the text color of ONLY the second row in a table to red
445. The Hex color #0000FF is equal to:
Answers:
• green
• red
• blue
• yellow
446. What is the border-spacing property?
Answers:
• It is the distance between the text in 1 cell to the text of adjacent cells.
• It is the distance between a table and text outside the table.
• It sets the distance between the borders of adjacent cells (only for the "separated borders" model).
• It is the distance between 1 table to another table.
• It is the distance between the border and text in the table.
447. What does the following mean: ul[id^="name-here"]
Answers:
• target any <ul> with an ID that ends with 'name-here'
• target any <ul> with an ID that starts with 'name-here'
• target any <ul> with an ID that contains 'name-here'
• target any <ul> with an ID similar to 'name-here'
448. What property defines whether background images scroll along with the element when the document is scrolled?
Answers:
• bg-move
• bg
• background-scroll
• main-bg-scroll
• background-attachment
449. Which of the following is NOT a common browser layout engine that determines CSS default styles?
Answers:
• Commando
• Trident
• Gecko
• WebKit
450. A CSS ________ is a keyword added to selectors that specifies a special state of the element to be selected.
Answers:
• selector
• operator
• element
• pseudo-class
• rule
451. What is the name for a property that clears an area outside the border and is completely transparent?
Answers:
• box model
• border
• padding
• content
• margin
452. What property is used with the :before and :after pseudo-elements to insert generated content?
Answers:
• value
• insert
• content
• html
• text
453. What does the outline-offset property do?
Answers:
• Draws an outline beyond the border edge.
• Both of the other answers are correct.
• Offsets an outline
454. If an element appears before a floated element that element will...
Answers:
• float to the center
• float to the bottom
• not be affected.
• float around it
• float to the top
455. When using "position: absolute;" the reference point is the browser window UNLESS one of the parent elements contain one of the following...
Answers:
• position: static;
• position: inherit;
• position: fixed;
• All of these
• position: relative
456. What has the greatest specificity?
Answers:
• h2.foo {color: blue;}
• *.foo tr:first-child {background: black;}
• #footer {background: white;}
• div strong {font-weight: bolder;}
457. Which property is used to specify type faces ?
Answers:
• font-type
• font-face
• font-name
• font-family
458. What character is used before the pseudo-class property?
Answers:
• colon
• dot
• semicolon
• hash
459. What does a 'position: fixed;' declaration accomplish?
Answers:
• Fixes the element on its parent element
• Fixes the element relative to the browsers viewport
• Fixes the element on the page
460. What does "Cascading" in CSS refer to?
Answers:
• The hierarchy of rules which determines how element properties are inherited
• The way elements of a document can "cascade" by being moved on the page
• A series of independent rules to control document style
• Separates a document's content from its display rules
461. Select the correct value to set the background to silver for even rows.
Answers:
• tr:nth-child(2) {background: silver;}
• tr:nth-child(1) {background: silver;}
• tr:nth-child(2n) {background: silver;}
• tr:even {background: silver;}
462. What does the background-attachment property do?
Answers:
• It sets whether a background image should scroll with the content, or be fixed.
• It links background as an external file.
• It displays a link to the background.
• It attaches an image to the background.
463. Where will a block level element appear in relations to the previous element in the document (by default)?
Answers:
• Above the previous element
• On top of the previous element
• Alongside the previous element
• Below the previous element
464. What is NOT an advantage of using CSS files?
Answers:
• Ability to hide the CSS code from the user.
• The ability to change the look of a whole site by changing a single file.
• Separation of style and content.
• Less-cluttered HTML code, making it easier to read and maintain.
465. Which at-rule allows you to define custom fonts?
Answers:
• @type-family { }
• @font-family { }
• @font-face { }
• @font { }
466. Pseudo-classes are used to represent _______.
Answers:
• Casual Events
• Dynamic Events
• Static Events
• Related Events
467. Which of the following best describes the effect that a floated element has on surrounding elements?
Answers:
• The elements after the floating element will flow around it.
• The elements before the floating element will be affected.
• If an image is floated to the right, a following text flows around it, to the right:
468. What does the following declaration accomplish?  div{background-color: rgba(255,255,255,0.8); }
Answers:
• It sets a white background with a transparency of 80% to the div element.
• It sets a black background with a transparency of 80% to the div element.
• It sets a light gray background with a transparency of 80% to the div element and its children.
• It sets a dark gray background to the div element.
• Nothing: this declaration is not supported in Webkit browsers.
469. Given: table { color: blue; }, which part represents the property?
Answers:
• { color: blue; }
• blue
• table
• color
470. Identify the value in the following rule: a:hover { text-decoration: none; }
Answers:
• none
• text-decoration
• a
• text-decoration: none;
• a:hover
471. Which of the following color values is invalid?
Answers:
• #f00
• rgb(1, 2, 3)
• transparent
• They're all valid.
• #abcdef
472. What are the correct values for "float" property?
Answers:
• left, right, top, bottom
• left, right
• left, right, all
• left, right, none
473. What CSS selector selects all elements with a target attribute?
Answers:
• [target]
• [blank]
• [target=_blank]
• [target_blank]
474. Which selector specifies that a list uses squares?
Answers:
• list-style: square;
• list-type-style: square;
• type: square;
• type: 4 corners;
• list-style-type: square;
475. What is the effect of the following css rule? [title]{color:blue;}
Answers:
• The titlebar of the browser will be blue
• Nothing
• All elements with a title attribute will be blue
• All elements other than a title attribute will be blue
476. The elements after the floating element will...
Answers:
• be deleted
• move a way from it
• flow around it
• not be affected
• clear
477. What is the purpose of line-height?
Answers:
• Set the height of the html hr tag.
• Set the height for each line of text in an html element.
• To vertical align text in an html element.
• All of these.
478. Which property is used to set all the outline properties in one declaration?
Answers:
• outline-all
• outline-total
• outline
• all of these
479. Which of the following tells the browser where you want to apply the rule?
Answers:
• Body
• Selector
• Main
• Value
• Property
480. The box model consists of which of the following:
Answers:
• margins,borders, padding, and the actual content
• display, visibility, position, and z-index
• width, height, border, and length
• div and table
• HTML, CSS, and Javascript
481. how to set multiple images in background through css
Answers:
• background:image= url(a2z.png), url(xyz.png);
• background-image= url(xyz.png) > url(a2z.png);
• background-image: url(xyz.png); background-image:url(a2z.png);
• background-image: url(xyz.png), url(a2z.png);
• background-image: url(xyz.png) url(a2z.png);
482. Which element is a block element?
Answers:
• <ul>
• <p>
• <h1>
• <div>
• All
483. Why will the following declaration not work? p {    margin-right: 80 px;  }
Answers:
• the P does not have a #
• a right margin can only be 50 pixels or less
• It should be right-margin
• there is a space between 80 and px
484. Which of the following specifies what the style actually does?
Answers:
• Class
• Selector
• Properties
• Id
485. What is the direction property in CSS?
Answers:
• It specifies the text direction/writing direction.
• It specifies the orientation an ordered list.
• It specifies the orientation of the webpage.
• It specifies the orientation an image.
486. What hyperlink property specifies whether new destination links should open in a new window or in a new tab of an existing window?
Answers:
• target-new
• target-open-window
• tafget-open-new
• target-fresh
487. The following is an example of which type of CSS selector?  E > F
Answers:
• Child selector
• Sibling selector
• Adjacent selector
• Parent selector
488. When determining hex colors, which value is the greatest?
Answers:
• e
• 9
• 0
• f
489. What is the CSS shorthand to set a borders top to 10, bottom to 5, left to 20 and right to 1 pixel?
Answers:
• border: 10px 20px 5px 1px;
• border: 5px 20px 10px 1px;
• border: 10px 5px 20px 1px;
• border: 10px 1px 5px 20px;
490. What is the transform: translate() method used for?
Answers:
• the text is translated to the language given as parameter in the method
• to translate the text into English
• To use non-euclidean geometry
• to move elements from their current position by an offset depending on the X and Y parameters
491. In the following line;     H1 { color:blue } What is the part within the curly braces?
Answers:
• Value
• Selector
• Property
• Declaration
492. Which one is not a correct value of  clear property?
Answers:
• clear:none;
• clear:both;
• clear:inherit;
• clear:left;
• clear:all;
493. What is absolute positioning?
Answers:
• When an element is positioned relative to the browser window.
• When an element is positioned in a natural location in a page's flow.
• When an element is positioned relative to the first parent element that has a position other than static.
• When an element is positioned using only z-index positioning.
494. What is the default value of position: ?
Answers:
• absolute
• relative
• static
• fixed
• inherit
495. Which property allows you to increase or decrease the white space between words?
Answers:
• word-spacing
• word-margin
• text-spacing
• letter-spacing
496. Which of the following is correct for specifying the print media type?
Answers:
• @media-print { p.test {font-family:times,serif;font-size:10px;} }
• @media-screen: print { p.test {font-family:times,serif;font-size:10px;} }
• @media-type: print { p.test {font-family:times,serif;font-size:10px;} }
• @media print { p.test {font-family:times,serif;font-size:10px;} }
497. What is the default align for <tfoot>?
Answers:
• none
• justify
• right
• left
498. Which of these is not a valid generic font-family?
Answers:
• handwriting
• sans-serif
• monospace
• serif
• fantasy
499. Which tags are used to fill the semantic need for text to be marked as more important or stressed?
Answers:
• <em>, <b>
• <strong>, <important>
• <strong>, <b>
• <em>, <strong>
• <i>, <strong>
500. Which of the following properties can be used to create multiple columns for laying out text - like in newspapers?
Answers:
• column-rule
• all of these
• column-count
• column-gap
501. What is the effect of using a negative number in a padding declaration?  Example: p {padding-top: -10px;}
Answers:
• Same as padding-top: 0px;
• Same as margin-top: -10px;
• Same as position: absolute; top: -10px;
• same as padding-top: 10px;
502. What is the cascading order (from lowest to highest priority) when there are multiple styles specified for an HTML element?
Answers:
• 1) inline style (inside an HTML element), 2) internal style sheet (in the head section), 3) external style sheet, 4) browser default
• 1) browser default, 2) inline style (inside an HTML element), 3) internal style sheet (in the head section), 4) external style sheet
• 1) internal style sheet (in the head section), 2) inline style (inside an HTML element), 3) browser default, 4) external style sheet
• 1) browser default, 2) external style sheet, 3) internal style sheet (in the head section), 4) inline style (inside an HTML element)
• 1) external style sheet, 2) internal style sheet (in the head section), 3) inline style (inside an HTML element), 4) browser default
503. When styling links, a:active must come _____ a:hover.
Answers:
• after
• before
504. Which of the following is correct for the word-wrap Property?
Answers:
• p.test {word-wrap:break-text;}
• p.test {word-wrap:break;}
• p.test {word:wrap-text;}
• p.test {word-wrap:wrap;}
• p.test {word-wrap:break-word;}
505. Which vertical-align value is not correct?
Answers:
• vertical-align: sub
• vertical-align: bottom
• vertical-align: text-base
• vertical-align: super
506. What is the adjacent sibling selector?
Answers:
• >
• :
• +
• -
• *
507. Which value of display property is NOT valid?
Answers:
• display: table-row;
• display: table-row-group;
• display: inline-table;
• display: list-item;
• display: inline-caption;
508. To style a link that ends in .html differently than a link that ends with another file extension you would use which code?
Answers:
• a[href*='.html']{color: purple;}
• a[href^='.html']{color: purple;}
• a[href&='.html']{color: purple;}
• a[href$='.html']{color: purple;}
509. How can you keep the parent element from collapsing when all elements inside are being floated?
Answers:
• Using a clear fix
• Using overflow: hidden;
• Specify a height
• All of these
510. What is the specificity calculation for an ID in CSS?
Answers:
• 100
• 050
• 001
• 010
• 101
511. How do you select all the first <p> elements that immediately follow a <h2> element?
Answers:
• h2 p { }
• h2 > p { }
• h2 + p { }
• h2 ~ p { }
512. If the link to the external css is placed after the embedded css in the <head>...
Answers:
• the embedded css will override the external styles.
• the external styles will override the embedded styles.
513. Which of the following declarations is incorrect?
Answers:
• table { border-collapse: separate; }
• table { direction: rtl; }
• table { table-layout: fixed; }
• table { display: table-column-grouped; }
• table { empty-cells: hide; }
514. With regards to the cascade effect of CSS, when does the order of css style rules matter most?
Answers:
• The order only matters when using external style sheets.
• The order does not matter.
• When the rules are equal in specificity.
• The order always matters.
515. Which of the following is true about this style?  border-width: thin medium thick 3px;
Answers:
• The bottom border is medium thickness.
• All borders are thin.
• Thick borders have a thickness of 3px.
• The left border will have a thickness of 3px.
516. What does the CSS speak-header property do?
Answers:
• Specifies whether the tables contents should be spoken or not
• Specifies a sound to be played before speaking a tables content
• Specifies whether table headers are spoken before every cell
• Specifies whether the tables caption should be spoken or not
• Specifies whether content will render aurally
517. What is the total width for this div : div { width: 100px; margin: 5px; padding: 10px 5px 15px 5px; border: 5px solid #000; }
Answers:
• 130px
• 110px
• 120px
518. Which of the following is NOT valid.
Answers:
• visibility: collapse
• visibility: hidden
• visibility: inherit
• visibility: none
• visibility: visible
519. Which of the following text-decoration styles is not correct?
Answers:
• text-decoration: overline
• text-decoration: inherit
• text-decoration: underline
• text-decoration: strike-through
520. What does the CSS cue property do?
Answers:
• Specifies a sound to be played as a background while an element's content is spoken
• Specifies the frequency of the speaking voice
• Prompts the user to enter a voice command
• Specifies a sound to be played before and after the selected element
521. Which of the following is a required box-shadow property?
Answers:
• color
• spread
• h-shadow
• blur
• inset
522. What is the recommended order for styling an <a> tag?
Answers:
• a:active { } , a:visited { } , a:hover { } , a:link { }
• a:link { } , a:visited { } , a:hover { } , a:active { }
• a:link { } , a:hover { } , a:active { } , a:visited { }
• a:link { } , a:active { } , a:hover { } , a:visited { }
• a:active { } , a:link { } , a:hover { } , a:visited { }
523. The css property border-style:dotted solid; would have the following effect:
Answers:
• Specifies all four borders are dotted
• Is not correct
• Would specify different borders for different sides
• Specifies a double border
524. What page media property gives a hint for how to scale a replaced element if neither its width nor its height property is auto?
Answers:
• main
• size
• scale
• fit
525. Which of the following declarations is incorrect?
Answers:
• ul { list-style-type: circle; }
• ul { list-style-type: hiragana; }
• ul { list-style-type: decimal-leading-zero; }
• ul { list-style-type: lower-alpha; }
• ul { list-style-type: roman; }
526. Which of the following is not a pseudo class?
Answers:
• link
• lang
• first
• active
527. When can a semicolon be omitted?
Answers:
• When there is only one statement in a rule
• All of the above.
• Last statement in a group
• Inline style setting in an HTML tag
528. Which of the following specifies the number of times an animation should be played?
Answers:
• iteration-count
• iteration
• animation-iteration-count
• animation-count
529. position: absolute means...
Answers:
• That the element is positioned accordingly to the closest ancestor with a position.
• That the element is positioned accordingly to the closest ancestor with a relative position.
• That the element is positioned accordingly to the browser window.
• That the element is positioned accordingly to the closest ancestor with an absolute position.
530. Specifies a rotation in the right or clockwise direction that a user agent applies to an image
Answers:
• image-rotation
• image-transform
• image-orientation
• image-move
531. What CSS value scales the background image to the largest size contained within the element?
Answers:
• fill
• repeat
• contain
• cover

No comments:

Post a Comment