Friday, December 11, 2015

CSS / CSS3 Upwork test answers of 2016


In this post you can find Complete and recently updated Correct Question and answers of CSS3.All Answers updated regularly with new questions. Upwork CSS / CSS3 test answers of 2016.


Question:* Consider the following code snippet: <div id="sectors"> <div id="A" class="A"></div> <div id="B" class="B"></div> <div id="C" class="C"></div> <div id="D" class="D"></div> <div id="E" class="E"></div> </div> With these style rules: <style> #sectors > div { float: left; position: relative; width: 80px; height: 80px; margin: 16px; background-color:red; color: white; text-align: center; } #sectors > div::after { content: attr(id) '-Block'; } #sectors > div.changecolor { background-color: blue; } </style> Which of the following code snippets when inserted into CSS will change the A and B div’s color from red to blue?

Answer: • In style rule add this code “#sectors > div:not(.C):not(.D):not(.E) {background-color: blue;}”

Question:* Which of the following will create a triangle effect using pure CSS3 on a white background, without making use of background images?

Answer: • border-color: #a0c7ff #ffffff #ffffff #ffffff; border-style: solid; border-width: 20px; width: 0px; height: 0px;

Question:* Can a percentage value be given in a ruby-align property?

Answer: • No

Question:* Consider the following font definition: font-weight:normal What is the other way of getting the same result?

Answer: • font-weight:400

Question:* Consider the following code: div[class^="stronger"] { } {em ... } Which of the following statements is true?

Answer: • It applies the rule only on divs who belong to a class that begins with "stronger".

Question:* For the clear property, which of the following values is not valid?

Answer: • top

Question:* What will be the output of the following code? <style> .foo { width:100px; height:50px; border-width:3px; -webkit-border-image: -webkit-gradient(linear, 0 0, 0 100%, from(black), to(red)) 1 100%; -webkit-border-image: -webkit-linear-gradient(black, red) 1 100%; -o-border-image: -o-linear-gradient(black, red)) 1 100%; -moz-border-image: -moz-linear-gradient(black, red) 1 100%; } </style> <div class="foo">Lorem</div>

Answer: • The border of div element will be colored black-red.

Question:* Which of the following is not a valid value for the font-smooth property?

Answer: • normal

Question:* Which of the following option does not exist in media groups available in CSS3?

Answer: • braille or screen

Question:* Which of the following is not a valid page break?

Answer: • page-break-outside

Question:* Which statement is correct given the following? box-shadow:30px 20px 10px 5px black;

Answer: • The position of the horizontal black shadow is 30px and the position of the vertical black shadow is 20px and blur distance is 10px and size of shadow is 5px.

Question:* The min-width property cannot be applied to the following element:

Answer: • table row

Question:* Given the following problem: A drop shadow needs to appear only at the bottom, and no images should be used. Consider the following code: -moz-box-shadow: 0px 4px 4px #000; -webkit-box-shadow: 0px 4px 4px #000; box-shadow-bottom: 5px #000; However, this produces shadows on the rest of the element. Which of the following code snippets will correct the issue?

Answer: • -webkit-box-shadow: 0 4px 4px -2px #000000; -moz-box-shadow: 0 4px 4px -2px #000000; box-shadow: 0 4px 4px -2px #000000;

Question:* Consider the following code: body { text-replace: "a" "b" "b" "c" } What will be the output of the following string if the text-replace style is implemented? andy lives behind cafe

Answer: • cndy lives cehind ccfe

Question:* What is the default value of the transform-style property?

Answer: • flat

Question:* What will be the output of the following code? ... <style> .foo { width:100px; height:50px; border-width:3px; -webkit-border-image: -webkit-gradient(linear, 0 0, 0 100%, from(black), to(red)) 1 100%; -webkit-border-image: -webkit-linear-gradient(black, red) 1 100%; -o-border-image: -o-linear-gradient(black, red)) 1 100%; -moz-border-image: -moz-linear-gradient(black, red) 1 100%; } </style> ... <div class="foo">Lorem</div>

Answer: • The border of div element will be colored black-red.

Question:* Which of the following styles is not valid for an image?

Answer: • All of the above

Question:* Suppose that a <tr> tag has 10 <td> tags. In this case which statement is correct given the following? td:nth-child(3n+0){ background-color: orange; }

Answer: • The background color of every third td will be orange.

Question:* What is the best method to select all elements except for the last one in an unordered list?

Answer: • Using li:not(:last-child) css selector

Question:* Which of the following will apply a black inner glow with 25% opacity to a page element?

Answer: • box-shadow: inset 0 0 8px rgba(0,0,0, 0.25);

Question:* Which of the following is the initial value for the column-fill property?

Answer: • balance

Question:* Which of the following can be used to add a shadow around the div element below? <div>Lorem ipsum</div>

Answer: • box-shadow: 0 0 8px 2px #888;

Question:* Which of the following will decrease 50px from a DIV element whose width is 100%?

Answer: • width: calc(100% - 50px);

Question:* Which of the following properties specifies the minimum number of lines of a paragraph that must be left at the bottom of a page?

Answer: • orphans

Question:* What is the maximum value that can be given to the voice-volume property?

Answer: • 100

Question:* What is the initial value of the font-size property?

Answer: • medium

Question:* Is there a way to create a pure CSS3 text color gradient?

Answer: • There is no way to do a text color gradient with CSS3.

Question:* Consider the following code: border-opacity:0.7; Given a div element that needs to have a transparent red border, which of the following code samples will work in conjunction with the code above to accomplish the requirement?

Answer: • border: 1px solid rgba(255, 0, 0, 0.7);

Question:* What is the initial value of the animation-iteration-count property?

Answer: • 1

Question:* What is the default value of the animation-direction property?

Answer: • normal

Question:* Is it possible to combine a background image and CSS3 gradients?

Answer: • It is possible only when "background-image" is used.

Question:* What will happen if the cursor property value is set to none?

Answer: • No cursor will be displayed.

Question:* What will be the outcome of given code? div[class^="stronger"] { } { ... }

Answer: • It applies the rule only on divs who belong to a class that begins with "stronger".

Question:* To apply style on every input element except text, which of the following selectors should be used?

Answer: • input:not([type="text"])

Question:* For the clear property, which of the following value is not valid?

Answer: • top

Question:* Read the following: @page rotated {size: landscape} TABLE {page: rotated; page-break-before: right} What will this code do?

Answer: • It will put all tables on a right-hand side landscape page.

Question:* What is the initial value of the opacity property?

Answer: • 1

Question:* State whether the following statement is true or false. If a parent element display property is set to none, its children too will not be rendered.

Answer: • True

Question:* Which of the following filters does SVG support?

Answer: • SVG supports CSS filters as well as 'filter' property of SVG

Question:* What will happen if the pause property is used as follows? h2 { pause: 40s 60s }

Answer: • pause-before will be set to 40 seconds and pause-after will be set to 60 seconds.

Question:* Which of the following properties allow percentages in their value fields?

Answer: • font-size

Question:* Which of the following is not a valid value for the font-stretch property?

Answer: • semi-narrower

Question:* Which of the following styles is valid?

Answer: • None of these.

Question:* Which one of the following is appropriate to mirror/flip text by using CSS3?

Answer: • .mirror_text{ -moz-transform: scaleX(-1); -o-transform: scaleX(-1); -webkit-transform: scaleX(-1); transform: scaleX(-1); filter: FlipH; -ms-filter: "FlipH"; }

Question:* What is the initial value of the marquee-speed property?

Answer: • normal

Question:* Which of the following will apply a gradient transition to #DemoGradient using CSS3?

Answer: • #DemoGradient{ background: -webkit-linear-gradient(#C7D3DC,#5B798E); background: -moz-linear-gradient(#C7D3DC,#5B798E); background: -o-linear-gradient(#C7D3DC,#5B798E); background: linear-gradient(#C7D3DC,#5B798E); -webkit-transition: background 1s ease-out; -moz-transition: background 1s ease-out; -o-transition: background 1s ease-out; transition: background 1s ease-out; background-size:1px 200px; border-radius: 10px; border: 1px solid #839DB0; cursor:pointer; width: 150px; height: 100px; } #DemoGradient:Hover{ background-position:100px; }

Question:* Using height on transitions is not possible with:

Answer: • height:auto

Question:* Consider the following problem: When trying to apply a CSS3 style to a label of a checked radio button like this: .... <style> label:checked { font-weight: bold; } </style> .... <input type="radio" id="rad" name="radio"/> <label for="rad">A Label</label> This does not produce the desired effect. Which of the following snippets will correct issue?

Answer: • input[type="radio"]:checked+label{ font-weight: bold; }

Question:* There are various types of input fields in a HTML page. Choose the appropriate CSS3 code which will have an effect on all inputs, except checkbox and radio.

Answer: • input:not([type="radio"]):not([type="checkbox"]) { }

Question:* Is it possible to use transition animations with a gradient background?

Answer: • No

Question:* What is the difference between float:left; vs display:inline-block; ?

Answer: • display:inline-block; adds whitespace between the elements.

Question:* What is the range of values (in decimal notation) that can be specified in the RGB color model?

Answer: • 0 to 255

Question:* Which of the following are not valid values for the target-new property?

Answer: • parent

Question:* What will be the output of the following rule? em { color: rgba(0,0,255,1) }

Answer: • Opacity 1 with solid blue color

Question:* While rendering the following code, what is the role of "src" propery? @font-face { font-family: "calibriforh1"; src: local("calibri"), url(calibri.woff); } h1 { font-family: "calibriforh1", arial, sans-serif; }

Answer: • It's for searching the user's system for a "calibri" font, and if it does not exist, it will load the font from the server instead.

Question:* Which of the following statements is true with regard to CSS3 transitions?

Answer: • The completion of a CSS transition generates a corresponding DOM event. An event is fired for each property that undergoes a transition. This allows a content developer to perform actions that synchronize with the completion of a transition.

Question:* Given that one div element needs to be hidden and on active state needs to be displayed, what will be the output of the following code? div { display: none; -webkit-transition: opacity 1s ease-out; opacity: 0; } div.active { opacity: 1; display: block; }

Answer: • On active state the element is displayed.

Question:* Which of the given options is/are equivalent to the following rule? DIV { line-height: 1.2; font-size: 10pt }

Answer: • DIV { line-height: 1.2em; font-size: 10pt }

Question:* What will happen if the following style declaration is applied to an element? p { margin: 3em 2em }

Answer: • The top and the bottom margins will be 3em and the left and the right margins will be 2em.

Question:* Consider the following code snippet: <div id="sectors"> <div id="A" class="A"></div> <div id="B" class="B"></div> <div id="C" class="C"></div> <div id="D" class="D"></div> <div id="E" class="E"></div> </div> With these style rules: <style> #sectors > div { float: left; position: relative; width: 80px; height: 80px; margin: 16px; background-color:red; color: white; text-align: center; } #sectors > div::after { content: attr(id) '-Block'; } #sectors > div.changecolor { background-color: blue; } </style> Which of the following code snippets when inserted into CSS will change the A and B div’s color from red to blue?

Answer: • In style rule add this code “#sectors > div:not(.C):not(.D):not(.E) {background-color: blue;}”

Question:* Which of the following will create a triangle effect using pure CSS3 on a white background, without making use of background images?

Answer: • border-color: #a0c7ff #ffffff #ffffff #ffffff; border-style: solid; border-width: 20px; width: 0px; height: 0px;

Question:* Can a percentage value be given in a ruby-align property?

Answer: • No

Question:* Consider the following font definition: font-weight:normal What is the other way of getting the same result?

Answer: • font-weight:400

Question:* Consider the following code: div[class^="stronger"] { } {em ... } Which of the following statements is true?

Answer: • It applies the rule only on divs who belong to a class that begins with "stronger".

Question:* For the clear property, which of the following values is not valid?

Answer: • top

Question:* What will be the output of the following code? <style> .foo { width:100px; height:50px; border-width:3px; -webkit-border-image: -webkit-gradient(linear, 0 0, 0 100%, from(black), to(red)) 1 100%; -webkit-border-image: -webkit-linear-gradient(black, red) 1 100%; -o-border-image: -o-linear-gradient(black, red)) 1 100%; -moz-border-image: -moz-linear-gradient(black, red) 1 100%; } </style> <div class="foo">Lorem</div>

Answer: • The border of div element will be colored black-red.

Question:* Which of the following is not a valid value for the font-smooth property?

Answer: • normal

Question:* Which of the following option does not exist in media groups available in CSS3?

Answer: • braille or screen

Question:* Which of the following is not a valid page break?

Answer: • page-break-outside

Question:* Which statement is correct given the following? box-shadow:30px 20px 10px 5px black;

Answer: • The position of the horizontal black shadow is 30px and the position of the vertical black shadow is 20px and blur distance is 10px and size of shadow is 5px.

Question:* The min-width property cannot be applied to the following element:

Answer: • table row

Question:* Given the following problem: A drop shadow needs to appear only at the bottom, and no images should be used. Consider the following code: -moz-box-shadow: 0px 4px 4px #000; -webkit-box-shadow: 0px 4px 4px #000; box-shadow-bottom: 5px #000; However, this produces shadows on the rest of the element. Which of the following code snippets will correct the issue?

Answer: • -webkit-box-shadow: 0 4px 4px -2px #000000; -moz-box-shadow: 0 4px 4px -2px #000000; box-shadow: 0 4px 4px -2px #000000;

Question:* Consider the following code: body { text-replace: "a" "b" "b" "c" } What will be the output of the following string if the text-replace style is implemented? andy lives behind cafe

Answer: • cndy lives cehind ccfe

Question:* What is the default value of the transform-style property?

Answer: • flat

Question:* What will be the output of the following code? ... <style> .foo { width:100px; height:50px; border-width:3px; -webkit-border-image: -webkit-gradient(linear, 0 0, 0 100%, from(black), to(red)) 1 100%; -webkit-border-image: -webkit-linear-gradient(black, red) 1 100%; -o-border-image: -o-linear-gradient(black, red)) 1 100%; -moz-border-image: -moz-linear-gradient(black, red) 1 100%; } </style> ... <div class="foo">Lorem</div>

Answer: • The border of div element will be colored black-red.

Question:* Which of the following styles is not valid for an image?

Answer: • All of the above

Question:* Suppose that a <tr> tag has 10 <td> tags. In this case which statement is correct given the following? td:nth-child(3n+0){ background-color: orange; }

Answer: • The background color of every third td will be orange.

Question:* What is the best method to select all elements except for the last one in an unordered list?

Answer: • Using li:not(:last-child) css selector

Question:* Which of the following will apply a black inner glow with 25% opacity to a page element?

Answer: • box-shadow: inset 0 0 8px rgba(0,0,0, 0.25);

Question:* Which of the following is the initial value for the column-fill property?

Answer: • balance

Question:* Which of the following can be used to add a shadow around the div element below? <div>Lorem ipsum</div>

Answer: • box-shadow: 0 0 8px 2px #888;

Question:* Which of the following will decrease 50px from a DIV element whose width is 100%?

Answer: • width: calc(100% - 50px);

Question:* Which of the following properties specifies the minimum number of lines of a paragraph that must be left at the bottom of a page?

Answer: • orphans

Question:* What is the maximum value that can be given to the voice-volume property?

Answer: • 100

Question:* What is the initial value of the font-size property?

Answer: • medium

Question:* Is there a way to create a pure CSS3 text color gradient?

Answer: • There is no way to do a text color gradient with CSS3.

Question:* Consider the following code: border-opacity:0.7; Given a div element that needs to have a transparent red border, which of the following code samples will work in conjunction with the code above to accomplish the requirement?

Answer: • border: 1px solid rgba(255, 0, 0, 0.7);

Question:* What is the initial value of the animation-iteration-count property?

Answer: • 1

Question:* What is the default value of the animation-direction property?

Answer: • normal

Question:* Is it possible to combine a background image and CSS3 gradients?

Answer: • It is possible only when "background-image" is used.

Question:* What will happen if the cursor property value is set to none?

Answer: • No cursor will be displayed.

Question:* What will be the outcome of given code? div[class^="stronger"] { } { ... }

Answer: • It applies the rule only on divs who belong to a class that begins with "stronger".

Question:* To apply style on every input element except text, which of the following selectors should be used?

Answer: • input:not([type="text"])

Question:* For the clear property, which of the following value is not valid?

Answer: • top

Question:* Read the following: @page rotated {size: landscape} TABLE {page: rotated; page-break-before: right} What will this code do?

Answer: • It will put all tables on a right-hand side landscape page.

Question:* What is the initial value of the opacity property?

Answer: • 1

Question:* State whether the following statement is true or false. If a parent element display property is set to none, its children too will not be rendered.

Answer: • True

Question:* Which of the following filters does SVG support?

Answer: • SVG supports CSS filters as well as 'filter' property of SVG

Question:* What will happen if the pause property is used as follows? h2 { pause: 40s 60s }

Answer: • pause-before will be set to 40 seconds and pause-after will be set to 60 seconds.

Question:* Which of the following properties allow percentages in their value fields?

Answer: • font-size

Question:* Which of the following is not a valid value for the font-stretch property?

Answer: • semi-narrower

Question:* Which of the following styles is valid?

Answer: • None of these.

Question:* Which one of the following is appropriate to mirror/flip text by using CSS3?

Answer: • .mirror_text{ -moz-transform: scaleX(-1); -o-transform: scaleX(-1); -webkit-transform: scaleX(-1); transform: scaleX(-1); filter: FlipH; -ms-filter: "FlipH"; }

Question:* What is the initial value of the marquee-speed property?

Answer: • normal

Question:* Which of the following will apply a gradient transition to #DemoGradient using CSS3?

Answer: • #DemoGradient{ background: -webkit-linear-gradient(#C7D3DC,#5B798E); background: -moz-linear-gradient(#C7D3DC,#5B798E); background: -o-linear-gradient(#C7D3DC,#5B798E); background: linear-gradient(#C7D3DC,#5B798E); -webkit-transition: background 1s ease-out; -moz-transition: background 1s ease-out; -o-transition: background 1s ease-out; transition: background 1s ease-out; background-size:1px 200px; border-radius: 10px; border: 1px solid #839DB0; cursor:pointer; width: 150px; height: 100px; } #DemoGradient:Hover{ background-position:100px; }

Question:* Using height on transitions is not possible with:

Answer: • height:auto

Question:* Consider the following problem: When trying to apply a CSS3 style to a label of a checked radio button like this: .... <style> label:checked { font-weight: bold; } </style> .... <input type="radio" id="rad" name="radio"/> <label for="rad">A Label</label> This does not produce the desired effect. Which of the following snippets will correct issue?

Answer: • input[type="radio"]:checked+label{ font-weight: bold; }

Question:* There are various types of input fields in a HTML page. Choose the appropriate CSS3 code which will have an effect on all inputs, except checkbox and radio.

Answer: • input:not([type="radio"]):not([type="checkbox"]) { }

Question:* Is it possible to use transition animations with a gradient background?

Answer: • No

Question:* What is the difference between float:left; vs display:inline-block; ?

Answer: • display:inline-block; adds whitespace between the elements.

Question:* What is the range of values (in decimal notation) that can be specified in the RGB color model?

Answer: • 0 to 255

Question:* Which of the following are not valid values for the target-new property?

Answer: • parent

Question:* What will be the output of the following rule? em { color: rgba(0,0,255,1) }

Answer: • Opacity 1 with solid blue color

Question:* While rendering the following code, what is the role of "src" propery? @font-face { font-family: "calibriforh1"; src: local("calibri"), url(calibri.woff); } h1 { font-family: "calibriforh1", arial, sans-serif; }

Answer: • It's for searching the user's system for a "calibri" font, and if it does not exist, it will load the font from the server instead.

Question:* Which of the following statements is true with regard to CSS3 transitions?

Answer: • The completion of a CSS transition generates a corresponding DOM event. An event is fired for each property that undergoes a transition. This allows a content developer to perform actions that synchronize with the completion of a transition.

Question:* Given that one div element needs to be hidden and on active state needs to be displayed, what will be the output of the following code? div { display: none; -webkit-transition: opacity 1s ease-out; opacity: 0; } div.active { opacity: 1; display: block; }

Answer: • On active state the element is displayed.

Question:* Which of the given options is/are equivalent to the following rule? DIV { line-height: 1.2; font-size: 10pt }

Answer: • DIV { line-height: 1.2em; font-size: 10pt }

Question:* What will happen if the following style declaration is applied to an element? p { margin: 3em 2em }

Answer: • The top and the bottom margins will be 3em and the left and the right margins will be 2em.

Question:* Identify the selector in the following rule: h1 { color: blue; }

Answer: • h1

Question:* What does the outline-offset property do?

Answer: • Both of the other answers are correct.

Question:* Which of the following is true about inline styles?

Answer: • They will override a style defined inside the <head> tag, in an external style sheet or in a browser (a default value).

Question:* In which direction are elements floated?

Answer: • Horizontally

Question:* Which of the following is used to select one paticular tag, rather than a group of tags?

Answer: • Id selector

Question:* The pseudo selector ":nth-child(2n)" can also be written as:

Answer: • :nth-child(even)

Question:* 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?

Answer: • padding:10px 25px 7px 2px

Question:* The text-align property is used to set the ______ alignment of a text.

Answer: • horizontal

Question:* Which value of the "text-transform" property transforms the first character in each word to uppercase?

Answer: • capitalize

Question:* What is NOT a correct value of background-position property?

Answer: • middle

Question:* If an image is floated to the right, where does a following text flow?

Answer: • around it, to the left

Question:* Which of the following css declarations will create italicized text?

Answer: • {font-style: italic;}

Question:* Which property specifies spacing behavior between text characters?

Answer: • letter-spacing

Question:* What is true about image sprites?

Answer: • Both of these

Question:* 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?

Answer: • fixed

Question:* What property is used to specify the indentation of the first line of a text?

Answer: • text-indentation

Question:* In this code, where will the <p> element be displayed? <body> <div style="position:relative"> <p style="position:absolute; bottom:0;"> </p> </div> </body>

Answer: • At the bottom of the <div> element

Question:* How do you hide an element, but have it still take up space and affect the layout?

Answer: • visibility: hidden;

Question:* What is the scale for opacity from least to most?

Answer: • 0 - 1

Question:* Is a # required before colors in CSS?

Answer: • No, only when specifying colors as hexadecimal values.

Question:* Which operator is used for pseudo classes?

Answer: • : (colon)

Question:* The caption-side property specifies the placement of a table caption. Which of the following is NOT a valid value?

Answer: • side

Question:* 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?

Answer: • justify

Question:* What is "inline" for the CSS display property?

Answer: • An inline element has no line break before or after it, and it tolerates HTML elements next to it.

Question:* What does "padding:15px 20px 25px" mean?

Answer: • - top padding is 15px - right and left paddings are 20px - bottom padding is 25px

Question:* In this CSS code, what element is the property? table {color: red;}

Answer: • color

Question:* By default, the background-image property repeats an image...

Answer: • both horizontally and vertically

Question:* What is the syntax for a customized cursor?

Answer: • Selector {cursor:value}

Question:* display:none hides an element, and it will...

Answer: • not take up any space. The element will be hidden, and the page will be displayed as the element is NOT there

Question:* Which of the following specifies the type of list-item marker?

Answer: • list-style-type

Question:* Given the following css rule, where would the style apply? #content table tr td ul li a {font-weight:bold;}

Answer: • Links inside of a list inside of a table inside of an element with an id of 'content'

Question:* How do you target the submit button for the <form id="example">?

Answer: • #example input[type="submit"]

Question:* Given .class { padding: 20px 10px; }, in what order do padding values apply?

Answer: • top & bottom, left & right

Question:* Which of the following applies a different background color for odd numbered rows in a given table?

Answer: • tr:nth-child(odd)

Question:* 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?

Answer: • CSS Image Sprites

Question:* What does the * stand for in CSS?

Answer: • Universal Selector

Question:* Where is the margin property located in the CSS box model?

Answer: • Outside the box

Question:* Which declaration removes bullets from a navigation list?

Answer: • list-style-type:none

Question:* What are the differences between "display:none" and "visibility:hidden" code?

Answer: • "display:none" hides the element and remove it's placeholder, "visibility:hidden" hides the element but keeps it's place blank.

Question:* What does image sprite do in CSS?

Answer: • It is a collection of images put into a single image.

Question:* You have three blocks of code that share property values. Which of the following ways is the most efficient?

Answer: • .one, .two, .three { property: value; }

Question:* 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?

Answer: • div {margin: 5px 2px 0 10px}

Question:* Of the following elements, which will be frontmost, on the top of the stack using z-index?

Answer: • Element with z-index of 9

Question:* What HTML tag can you use to import a style sheet into a document?

Answer: • Use the HTML <link /> tag, like this: <link rel='stylesheet' type='text/css' href='styles.css' /> .

Question:* In CSS3, which property is used to make sure a given element has a width of at least a set value?

Answer: • min-width

Question:* What does XSL, another style sheet language for XHTML, stand for?

Answer: • Extensible Stylesheet Language

Question:* If the name of a font family is more than one word, it must be in quotation marks.

Answer: • True

Question:* What is the CSS syntax for changing the default cursor to a pointing finger?

Answer: • cursor: pointer;

Question:* What of the following is the correct syntax in CSS?

Answer: • Selector {Property: Value;}

Question:* What does the list-style-position property do?

Answer: • It specifies if the list-item markers should appear inside or outside the content flow.

Question:* Which of the following is the correct syntax for a pseudo-class?

Answer: • selector:pseudo-class { ... }

Question:* Which of the following will remove the default underline under the link with an id of "content"?

Answer: • a#content {text-decoration:none;}

Question:* Which declaration can be used to have a block element always displays scrollbars?

Answer: • {overflow:scroll}

Question:* When adjusting a CSS sprite, which property do you use?

Answer: • background-position

Question:* Which property is used to set whether table borders are collapsed into a single border or detached as in standard HTML?

Answer: • border-collapse

Question:* What css selector selects the input element which has focus?

Answer: • input:focus

Question:* 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?

Answer: • <do></do>

Question:* If an image is floated to the right, the following text flows around it...

Answer: • to the left

Question:* What css selector selects all <div> elements and all <p> elements?

Answer: • div,p

Question:* On which position value does the z-index property work?

Answer: • all of the answers

Question:* Which declaration will make each word in an element start with a uppercase letter?

Answer: • text-transform: capitalize;

Question:* 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

Answer: • #home:target

Question:* To specify the style for a list, use the _________ property.

Answer: • list-style

Question:* In the CSS box model, where is the margin located?

Answer: • Immediately outside the box border

Question:* Which of the following produces a black border that is 1-pixel thick and dashed?

Answer: • border: 1px dashed #000

Question:* Which style does the following rule apply to? div.wrapper h2 { font-size: 18px; margin-top: 0px; }

Answer: • h2 heading inside element div of class wrapper

Question:* What does minifying CSS do?

Answer: • compresses the code by removing whitespace, which is not needed

Question:* An ____ style loses many of the advantages of style sheets by mixing content with presentation.

Answer: • Inline

Question:* What css selector selects every element that is not a <p> element?

Answer: • :not(p)

Question:* Which property is used to horizontally align the text in the table?

Answer: • text-align

Question:* Which style will cause all links to "http://www.smarterer.com" to be blue?

Answer: • a[href="http://www.smarterer.com"] { color: blue; }

Question:* Which syntax does older versions of Internet Explorer use for transparency?

Answer: • filter:alpha(opacity=x).

Question:* Which measurement can't be used to size text in CSS?

Answer: • huge

Question:* How do you apply multiple classes to an element?

Answer: • <div class="class1 class2" ></div>

Question:* If table {color: red;} is specified in a stylesheet, what happens to the table?

Answer: • Text within it is red

Question:* How can you override css cascade priority and force a particular css rule to apply?

Answer: • p { color:red !important; }

Question:* Which of the following is true about vertical-align property?

Answer: • It sets the vertical alignment of an element.

Question:* How do you remove browser default margin and padding settings?

Answer: • Set margin and padding to 0

Question:* Which is the correct syntax for referring to a pseudo-class?

Answer: • :hover

Question:* Block elements can be aligned to center by setting the left and right...

Answer: • margins to auto

Question:* Every CSS style definition has two components. What are they?

Answer: • selector, properties

Question:* Which of the following selects all unvisited links?

Answer: • :link

Question:* How do you set a paragraph to have a border of 5px in red color?

Answer: • p { border:5px solid red; }

Question:* Which HTML tag is used to define an embedded style sheet?

Answer: • <style>

Question:* What is the child selector in css?

Answer: • >

Question:* Normally, elements after a 'floated' element will flow around it. Which property can be used to avoid this?

Answer: • the clear property

Question:* 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?

Answer: • overflow: auto

Question:* Which of the following properties can be used to add space outside an element's box?

Answer: • margin

Question:* True or False : CSS class name starting with a number is supported by all browsers.

Answer: • False

Question:* Which of the following is true about border styles?

Answer: • None of these

Question:* Which of the following is NOT a valid image opacity rule?

Answer: • opacity: 2.0;

Question:* What css selctor Selects every <p> element that is the last child of its parent?

Answer: • p:last-child

Question:* What does the property text-align:center; do?

Answer: • Aligns text in horizontal center of the containing element

Question:* With what characters are CSS declarations separated?

Answer: • semicolon ( ; )

Question:* What does the child selector (">") do?

Answer: • Matches elements that are a direct child of the parent match

Question:* When using the background-color property with rgba(255, 0, 255, 0.5) what does the "a" refer to?

Answer: • Opacity (Alpha channel)

Question:* In this CSS code, what element is the selector? table {color: red;}

Answer: • table

Question:* What css selector selects all <p> elements that are contained inside of an element with an ID of 'content'?

Answer: • #content p

Question:* An attribute selector allows you to select an element with a specific attribute. To select a <input type="submit"> you would use:

Answer: • input[type=submit] { }

Question:* What rule is generally used, for responsive web design, to target devices with different widths?

Answer: • @media

Question:* How do you hide an element and remove it from the document flow?

Answer: • Add "display: none" to your style sheet rule.

Question:* With what characters are multiple fonts separated with?

Answer: • commas

Question:* When using z-index which other property is required?

Answer: • position

Question:* Which of the following sets all the border properties in one declaration?

Answer: • border

Question:* How can you create responsive websites through css?

Answer: • Use an @media query.

Question:* What is the correct pseudo-class for modifying only the first element of a selector?

Answer: • :first-child

Question:* What does the pseudo class last-child do?

Answer: • selects the last element in a targeted parent element.

Question:* Which of the following will apply a hex color of #445566 to each active link?

Answer: • a:active {color:#445566;}

Question:* What are the three methods for implementing a stylesheet?

Answer: • Inline, Embedded, and External

Question:* What is the correct shorthand syntax for a border?

Answer: • border: 1px solid #777;

Question:* Which line changes the background color of a link when a visitor hovers it?

Answer: • a:hover { background-color: #FF704D; }

Question:* In CSS, the term "box model" is used when talking about?

Answer: • design and layout

Question:* Which of the following has the highest priority?

Answer: • Inline style (inside an HTML element)

Question:* Which of the following is the correct syntax for using z-index?

Answer: • img {z-index:-1;}

Question:* How will this display: margin: 10px 5px;

Answer: • Top: 10px, right: 5px, bottom:10px, left:5px

Question:* What attribute is NOT required when using the <link> tag?

Answer: • head

Question:* Which of these examples of using the clear property are correct?

Answer: • .text_line { clear:both; }

Question:* How much space does an element take up within the document (on modern browsers) if it has "display: none" styling applied?

Answer: • It will not take up any space.

Question:* Which of the following is the correct syntax for importing one style sheet into another?

Answer: • @import url("other.css");

Question:* Which of the following defines the boundary within the element box against which background-image positioning is calculated?

Answer: • background-origin

Question:* To create a border of 3-pixel width, which css declaration would you use?

Answer: • border-width: 3px;

Question:* Which of the following characters is used to begin a css declaration block?

Answer: • {

Question:* #container {margin: 20px 30px 10px 50px} The margin-right value will be...

Answer: • 30px

Question:* What are the three methods for using style sheets with a web page?

Answer: • Inline, embedded or document level and external

Question:* You can apply a style to a selector within a selector without affecting the same selector outside the parent selector.

Answer: • True

Question:* Which property controls the additional space between the selected element(s) border and its content?

Answer: • padding

Question:* Which of these has the highest priority?

Answer: • inline style

Question:* How do you specify 30% opacity in CSS (ignoring IE)?

Answer: • opacity: 0.3

Question:* How would you hide an element using the display property?

Answer: • display: none;

Question:* Which of the following declarations would display a list without bullets?

Answer: • list-style-type: none

Question:* By which of the following is a declaration terminated?

Answer: • ;

Question:* Which side of the element with ID 'element' will have a 10px margin? #element { margin: 0px 5px 10px 20px;}

Answer: • bottom

Question:* What selector is used to select all elements?

Answer: • *

Question:* How do you set the text color in a css rule?

Answer: • color:

Question:* Can web fonts be imported with .css files directly

Answer: • Yes, by using @import url("fontname");

Question:* What is one way to center a fixed-width element (relative to its container)?

Answer: • margin: 0 auto;

Question:* Which attribute creates space between content and its container?

Answer: • padding

Question:* Which of the following is correct to transform text into uppercase?

Answer: • h1 {text-transform:uppercase;}

Question:* Which of the following selects the active link?

Answer: • :active

Question:* Which of the following sets the stack order of a positioned element?

Answer: • z-index

Question:* Which of the following elements takes up the full width available, and has a line break before and after it?

Answer: • Block element

Question:* What is the correct CSS syntax for making all the <p> elements bold?

Answer: • p { font-weight: bold; }

Question:* Which css rule will make an element with an id of "box" invisible?

Answer: • #box {visibility:hidden}

Question:* What is the difference between margin and padding?

Answer: • Margin is on the outside of block elements while padding is on the inside.

Question:* Which of the following units of measurement can be used when creating a margin?

Answer: • All of these

Question:* Which of the following will set h1 to 16 pixels, bold, and underline?

Answer: • h1 {font-size: 16px; font-weight: bold; text-decoration: underline;}

Question:* How can you assign a higher specificity to a property value?

Answer: • body { background: blue !important; }

Question:* Which of the following removes the bullet from an unordered list?

Answer: • list-style-type: none;

Question:* 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?

Answer: • #box {border: 2px, 0px, 1px, 0px;}

Question:* Which of the following applies a 2D or 3D transformation to an element?

Answer: • transform

Question:* Which of these can be used to apply style rules to elements in a document?

Answer: • All of these

Question:* How can you add a comment to a stylesheet?

Answer: • Enclose comment between opening and closing comment markers as follows: /* and */

Question:* Selects all elements with class="intro"

Answer: • .intro

Question:* Which of the following sets all the properties for a list in one declaration?

Answer: • list-style

Question:* Which value is used to define a dashed border?

Answer: • dashed

Question:* What is a CSS rule?

Answer: • Statements that tell the web browser how to render certain element or elements on the page.

Question:* Which of the following is correct to transform text to lowercase?

Answer: • p {text-transform:lowercase;}

Question:* Which of the following will set Verdana as the entire page's font type?

Answer: • body {font-family: Verdana;}

Question:* What is CSS valid syntax for setting the margin value to 0?

Answer: • margin: 0;

Question:* Which of the following code elements will ensure that all images have no border?

Answer: • img { border: none; }

Question:* Which css property can be used to display text with all uppercase, all lowercase, or with forced first-letter capitalization?

Answer: • text-transform

Question:* The CSS3 property for transparency is...

Answer: • opacity

Question:* Which of the following always refers to text color?

Answer: • color

Question:* Which of the following pseudo-elements are invalid?

Answer: • ;last-paragraph

Question:* Which are the two main parts of a CSS rule?

Answer: • Selector and Declaration

Question:* What css selector selects the document’s root element

Answer: • :root

Question:* What property can be used to turn everything into uppercase or lowercase letters, or capitalize the first letter of each word?

Answer: • text-transform

Question:* Which answer is equivalent to this: h1 { font-family: sans-serif; } h2 { font-family: sans-serif; } h3 { font-family: sans-serif; }

Answer: • h1, h2, h3 { font-family: sans-serif; }

Question:* What property is used to a set minimum height for an element?

Answer: • min-height

Question:* What does the property font-family do?

Answer: • Specifies which font to use

Question:* With these specifications, how will the paddings appear in browser? padding: 6px 3px 0px 3px;

Answer: • top: 6px, right: 3px, bottom: 0px, left: 3px,

Question:* On which side will there be a 20px padding if this is the specified: padding: 30px 15px 20px 10px;

Answer: • bottom

Question:* Which property specifies the spacing between lines?

Answer: • line-height

Question:* What css selector Insert content before every <p> element

Answer: • p:before

Question:* Which HTML tag is used to define an internal style sheet?

Answer: • <style>

Question:* In margin: 10px 20px 40px 30px; what will be the bottom margin?

Answer: • 40px

Question:* Which of the following is an example of using group selectors?

Answer: • h1, h2, p { color:green;}

Question:* True or False: Hexadecimal color values are supported in all major browsers.

Answer: • True

Question:* Which answer best describes the following statement? <div style="text-align:center; font-size: 14px;"></div>

Answer: • Inline CSS

Question:* What color does this hexadecimal code represent: #000?

Answer: • black

Question:* How do you display hyperlinks without an underline?

Answer: • a {text-decoration:none}

Question:* Which of the following css declarations will create bold text?

Answer: • {font-weight: bold;}

Question:* Which of the following is NOT a valid technique for applying styles to a document?

Answer: • exceptional styles

Question:* What is the correct method of changing text color?

Answer: • {color:#000000;}

Question:* What is the main difference between styling a <span> and a <div> element?

Answer: • <span> is an inline element by default, while <div> is a block element.

Question:* Is :focus a pseudo-class?

Answer: • Yes

Question:* What property changes the text color of an element?

Answer: • color

Question:* Which of the following is NOT a CSS font property?

Answer: • font-invariant

Question:* Which of the following css declarations would style hyperlinks using sans-serif fonts?

Answer: • a:link {font-family: "lucida sans unicode", sans-serif;}

Question:* What is the correct selector format for ID elements in CSS, where id_name is unique ID name to be formatted?

Answer: • #id_name { }

Question:* How would you define class 'myclass' that sets the width of an element to 640px and the height to 480px ?

Answer: • .myclass {width: 640px; height: 480px;}

Question:* Internet Explorer supports the fixed value only if...

Answer: • !DOCTYPE is specified.

Question:* Setting the left and right margins to auto specifies that they should split the available margin equally, resulting in...

Answer: • a centered element

Question:* How do you designate an inline style?

Answer: • style = " "

Question:* With what character does a declaration block start and end with?

Answer: • starts with { and ends with }

Question:* What does the float property do?

Answer: • Aligns HTML elements to the right or left while allowing content to flow around it

Question:* What can CSS selectors look for?

Answer: • all of these

Question:* What is the difference between ID and Class?

Answer: • You can use multiple classes on the same element, but you can't do that with ID's

Question:* Which of the following CSS3 properties is used to round the corners of elements?

Answer: • border-radius

Question:* What property is used to a set maximum height for an element?

Answer: • max-height

Question:* Which of the following will set the entire page background color?

Answer: • body {background-color:#FFFFFF;}

Question:* In which example below will all HTML elements with class="master" will be center-aligned?

Answer: • .master {text-align:center;}

Question:* Which of the following defines the tiling pattern for one or more background images?

Answer: • background-repeat

Question:* When does aligning a block element have no effect?

Answer: • when it's width is set to 100%

Question:* The background image for a page can be set like this:

Answer: • body {background-image:url('sand.gif');}

Question:* Block elements can be centered by setting the left and right margins to:

Answer: • auto

Question:* Which CSS property controls the text size?

Answer: • font-size

Question:* Where in an HTML document is the correct place to refer to an external style sheet?

Answer: • In the <head> section

Question:* A class is prefaced by what symbol?

Answer: • .

Question:* To set the bottom border width...

Answer: • border-bottom-width:15px;

Question:* 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)" />

Answer: • This image will be partially transparent.

Question:* What is the best way to insert CSS styles across multiple HTML files?

Answer: • External CSS

Question:* Which HTML attribute is used to define inline styles?

Answer: • style

Question:* The id selector uses the id attribute of the HTML element, and is defined with a...

Answer: • "#"

Question:* Is this a proper statement? body { font-family: Arial, Helvetica, sans-serif; color: #000; background-color: #FFF; }

Answer: • Yes

Question:* What does the border-radius property do?

Answer: • Creates rounded corners

Question:* Which CSS property contains the following attributes: normal, italic, oblique

Answer: • font-style

Question:* Hex colors are based off of what other web based color mode?

Answer: • RGB

Question:* Which of the following places one or more images in the background of the element?

Answer: • background-image

Question:* What does background-origin property do?

Answer: • It specifies the positioning area of the background images.

Question:* Which property is used to control the space between the border and content in a table?

Answer: • padding

Question:* Which tag is used to link External Style Sheets?

Answer: • <link>

Question:* Which answer best describes the following css rule? a {text-decoration:none;}

Answer: • Links will be styled with no underlines

Question:* Pseudo-elements can be combined with CSS classes.

Answer: • True

Question:* In CSS, it is possible to specify different padding for different sides?

Answer: • Yes

Question:* Which of the following is true for setting font type?

Answer: • p { font-family:"Times New Roman",Georgia,Serif; }

Question:* How do you add a background color?

Answer: • div {background-color : red}

Question:* 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>

Answer: • If the link in the example has been visited, it will be displayed in red

Question:* What does CSS stand for?

Answer: • Cascading Style Sheets

Question:* .center {text-align:center;} is an example of

Answer: • the class Selector

Question:* What is the default file extension for a CSS style sheet?

Answer: • .css

Question:* Which is the correct CSS syntax?

Answer: • body {color: black}

Question:* Which of these is the correct format for specifying a color?

Answer: • All of the above

Question:* Which is the correct syntax for centering the text in the header?

Answer: • h1 {text-align: center;}

Question:* How do you add a background color for all "<h1>" elements?

Answer: • h1 { background-color: #FFFFFF; }

Question:* What pseudo-class need to be used to style a link which has the mouse over it?

Answer: • a:hover

Question:* Which of the following sets how a background image will be repeated?

Answer: • background-repeat

Question:* What does the scale() method do?

Answer: • It increases or decreases the size of element

Question:* Where in an HTML document is the correct place to refer to an external style sheet?

Answer: • In the <head>

Question:* Which of the following properties is used to set a minimum width on an element?

Answer: • min-width

Question:* Which is the correct way to write a comment in CSS?

Answer: • /*This is a comment*/

Question:* Which of these is the correct way to specify color?

Answer: • All of these

Question:* Which syntax displays hyperlinks with an underline?

Answer: • a {text-decoration: underline}

Question:* Colors in CSS can be specified by the following methods:

Answer: • All of these

Question:* How do you add a background color for all <h1> elements?

Answer: • h1 { background-color: #FFF; }

Question:* What symbol do you use in CSS to call out to an ID?

Answer: • #

Question:* What is the correct HTML for referring to an external style sheet?

Answer: • <link rel="stylesheet" type="text/css" href="main.css">

Question:* Which CSS property controls the text size?

Answer: • font-size

Question:* Where in an HTML document is the correct place to refer to an external style sheet?

Answer: • In the <head> section

Question:* What css selector selects all elements?

Answer: • *

Question:* Which of the following increases or decreases the horizontal space between characters?

Answer: • letter-spacing

Question:* Which is the correct CSS syntax?

Answer: • selector { property: value; }

Question:* Dimension properties allow you to control:

Answer: • the height and width of an element

Question:* What do the height and width CSS dimension properties allow you to control?

Answer: • the height and width of an element

Question:* The outline property is used to control:

Answer: • all of these

Question:* Which of the following CSS declarations would change the border style?

Answer: • border-style: solid;

Question:* Which property is used to specify the kind of border to display?

Answer: • border-style

Question:* What property alters an elements background color?

Answer: • background-color

Question:* Who maintains CSS?

Answer: • W3C

Question:* Which tag is used to define an Internal Style Sheet?

Answer: • <style>

Question:* Which of these is not a vendor prefix?

Answer: • They are all vendor prefixes.

Question:* The class selector is used to specify a style for:

Answer: • a group of elements

Question:* What is the correct HTML for referring to an external style sheet?

Answer: • <link rel="stylesheet" type="text/css" href="mystyle.css">

Question:* What are the possible values of the property background-attachment?

Answer: • Both scroll and fixed

Question:* Which HTML tag is used to define an internal style sheet?

Answer: • <style>

Question:* Which element/pseudo-element pair can be used to create a mouseover effect on all links?

Answer: • a:hover

Question:* CSS stands for

Answer: • Cascading Style Sheets

Question:* Which of the following characters is used to end a css declaration block?

Answer: • }

Question:* Which is the correct CSS syntax?

Answer: • body { color: red; }

Question:* Which property is used to change the background color?

Answer: • background-color:

Question:* Which of these is the correct CSS syntax for specifying the left margin of an element?

Answer: • p {margin-left:20px;}

Question:* In an HTML document, where is the correct place to refer to an external CSS file?

Answer: • In the <head> section

Question:* When does the link state a:hover occur?

Answer: • When the user mouses over it

Question:* Which answer best describes the purpose of the following markup? <link rel="stylesheet" href="style.css" type="text/css" />

Answer: • To call an external stylesheet

Question:* Which of the following is NOT a web-safe font?

Answer: • Zapfino

Question:* Which of the following determines whether the text should be displayed as italics or regular text?

Answer: • font-style

Question:* Which symbol is used to define an ID?

Answer: • # (pound sign)

Question:* What does the background-color property do?

Answer: • Specifies the background color of an element

Question:* What is the extension for an external style sheet?

Answer: • .css

Question:* The background color can be specified by:

Answer: • All of these

Question:* Which character, followed by the selector's name, is used for defining ID selectors?

Answer: • #

Question:* Which properties can be applied to first-line pseudo-element?

Answer: • All of these

Question:* What should CSS be used for?

Answer: • styling

Question:* .css files may be created using what software?

Answer: • All of these, any text editor will do.

Question:* Which contemporary web browser(s) support CSS?

Answer: • All of these

Question:* Which CSS property controls the text size?

Answer: • font-size

Question:* The default value of the font-variant property is

Answer: • normal

Question:* 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?

Answer: • Responsive

Question:* Which property can be used to set the color of a text?

Answer: • color

Question:* An id is prefaced by what symbol?

Answer: • #

Question:* What is the correct HTML for referring to an external style sheet?

Answer: • <link rel="stylesheet" type="text/css" href="mystyle.css">

Question:* Where in an HTML document is the correct place to refer to an external style sheet?

Answer: • In the <head> section

Question:* What does CSS stand for?

Answer: • Cascading Style Sheets

Question:* What does CSS stand for?

Answer: • Cascading Style Sheets

Question:* Which configuration of the web elements in the page markup gives you great flexibility in the design of your site?

Answer: • All are correct

Question:* What is the correct HTML for referring to an external style sheet?

Answer: • <link rel="stylesheet" type="text/css" href="main.css">

Question:* Which is the correct CSS syntax?

Answer: • selector { property: value; }

Question:* Where in an HTML document is the correct place to refer to an external style sheet?

Answer: • In the <head>

Question:* Where in an HTML document is the correct place to refer to an external style sheet?

Answer: • In the <head> section

Question:* Which is the correct CSS syntax?

Answer: • body {color: black}

Question:* How do you add a background color for all <h1> elements?

Answer: • h1 {background-color:#FFFFFF;}

Question:* The id selector uses the id attribute of the HTML element, and is defined with a

Answer: • "#"

Question:* What does CSS stand for?

Answer: • Cascading Style Sheets

Question:* Where in an HTML document is the correct place to refer to an external style sheet?

Answer: • In the <head> section

Question:* Which is the correct syntax of the background color for links?

Answer: • a:link {background-color:#B2FF99;}

Question:* Which property can be used, along with a position property, to create an effect of layers?

Answer: • z-index

Question:* The _________ means an element that has the user's mouse pointer hovering over it.

Answer: • a:hover

Question:* Which CSS property can provide to add an effect when changing from one style to another,without using Flash animations or javascript?

Answer: • Transitions

Question:* Which is the correct CSS syntax?

Answer: • <p style="text-align:left;color:#00CC00"> This text is in left. </p>

Question:* Which property can be used to control the flow and formatting of text?

Answer: • white-space

Question:* How do you make the text bold?

Answer: • font-weight:bold

Question:* Which of the following ways below is correct to write a CSS?

Answer: • body {color: black}

Question:* Negative values for transition-duration are treated as

Answer: • 0

Question:* The ..................... specifies whether a border should be solid, dashed line, doted line, double line, groove etc.

Answer: • border-style

Question:* They must be define a border-style for the border to show up. Available terms:

Answer: • All are correct

Question:* A ___________ property can help you to create more complex webpage layouts

Answer: • z-index

Question:* The CSS list properties allow you to:

Answer: • All are correct

Question:* What does CSS define in HTML?

Answer: • How to display HTML elements

Question:* CSS colors are defined using a _________ notation for the combination of Red, Green, and Blue color values (RGB).

Answer: • hexadecimal

Question:* The <link> tag goes inside

Answer: • The head section

Question:* How to apply the text-shadow around the text?

Answer: • <p style="text-shadow:6px 6px 10px #FF0000 "> Text-shadow is of red color. </p>

Question:* Which states whether the text is underlined or not?

Answer: • text-decoration:

Question:* ...................... is used to import an external style sheet in a manner similar to the <link> element.

Answer: • @import

Question:* The ________________ specifies whether a border should be solid, dashed line, doted line, double line, groove etc.

Answer: • border-style

Question:* In reality layers are often used in more dynamic ways:

Answer: • All are correct

Question:* Which properties is used to change the case of the text?

Answer: • text-transform:

Question:* Which is the correct syntax of css border?

Answer: • .two { border: solid 6px #fff; position: relative; z-index: 1; }

Question:* True or False? With CSS, it's possible to customize the numbers that appear next to list items within <ol> elements.

Answer: • True

Question:* Which property can be used to decorate links by specifying no underline with the text?

Answer: • text-decoration:none

Question:* True or False: The universal selector, written "*", matches the name of any element type. It matches any single element in the document tree.

Answer: • True

Question:* The ___________ property allows to specify how much space appear between the content of an element and it's border.

Answer: • padding

Question:* __________ property is mostly used to remove underlines from links:

Answer: • text-decoration

Question:* 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.

Answer: • list-style-type

Question:* The text-decoration are:

Answer: • All are correct

Question:* Which is the correct CSS syntax?

Answer: • <p style="direction:inherit"> Possible values are ltr,rtl and inhert. </p>

Question:* The ____________ property allows to specify how much space appear between the content of an element and it's border.

Answer: • Padding

Question:* Which Represents a line that acts as a boundary?

Answer: • Border

Question:* How do you make a list that lists its items with squares?

Answer: • list-style-type: square

Question:* A ......... tag is used to specify that the browser is to fetch and use an external style sheet file

Answer: • <link>

Question:* Which property can be used to specify all the list properties into a single expression?

Answer: • list-style

Question:* Which styles of border can be look in dotted?

Answer: • border-style: dotted;

Question:* To create a layer all you need to do is assign the _______ attribute to your style

Answer: • position

Question:* Which property gets provide the increments or decrements the space between characters?

Answer: • letter-spacing

Question:* Hex values are written as 3 double digit numbers, starting with a

Answer: • # sign

Question:* CSS comments are inserted inside .

Answer: • /*..................*/

Question:* Which is the correct syntax of the CSS?

Answer: • <p style="font-size:14pt"> Welcome to teds-india.</p>

Question:* What are the two components of every CSS style definition?

Answer: • selector, properties

Question:* What do the Greater Than sign > indicate in CSS

Answer: • Select the child of the element it follows

Question:* What is the correct way to set the color of hover links?

Answer: • <style type="text/css"> a:hover {color:#000000} </style>

Question:* The id selector is used to specify a style for

Answer: • single, unique element

Question:* p { width:220px; padding:10px; border:5px solid gray; margin:0px; } The total width of an element is calculated like this:

Answer: • Total element width = width + left padding + right padding + left border + right border + left margin + right margin

Question:* Which concept uses the CSS from which implies that every HTML element is a box?

Answer: • box model

Question:* Which of the syntax is correct?

Answer: • <div style="position:relative; font-size:50px; z-index:2;">LAYER 1</div>

Question:* Which part of the box, where text and images appear?

Answer: • Content

Question:* The completion of a CSS Transition generates a corresponding

Answer: • DOM Event

Question:* The correct example of class selector is .

Answer: • h2.type1 {color: #000000;}

Question:* Pseudo classes may be applied to any element but are most commonly used with the __ element.

Answer: • 'a'

Question:* Multiple font faces are separated by __________

Answer: • Comma

Question:* Which is the correct CSS syntax?

Answer: • <p style="direction:ltr"> This text is in left direction. </p>

Question:* The following syntax to set margin around a paragraph will make- p{margin:10px 2%}

Answer: • Top and bottom margin will be 10px and left and right margin will be 2% of the total width.

Question:* The possible values of white-space are

Answer: • <p style="white-space:normal"> Use of normal white-space. </p>

Question:* What property is used to specify the indentation of the first line of a text?

Answer: • text-indent

Question:* What does a 'position: fixed;' declaration accomplish?

Answer: • Fixes the element relative to the browser's viewport

Question:* You have three blocks of markup that share property values. Which of the following ways is the most efficient?

Answer: • .one, .two, .three { property: value; }

Question:* Which values can be used to set text direction?

Answer: • ltr and rtl

Question:* An outline is always placed __________ of the box

Answer: • Outline

Question:* The_________ means unvisited hyperlinks.

Answer: • :link

Question:* Which two properties are the defaults when positioning a layer?

Answer: • top, left

Question:* The transition-duration property is in fact the only property required

Answer: • All are correct

Question:* What CSS selector selects all elements with a target attribute?

Answer: • [target]

Question:* ____________ properties provide several options to place the content on the web page.

Answer: • Positioning

Question:* Which properties specifying whether to write the text from left to right or from right to left?

Answer: • direction

Question:* A shorthand property for setting the four transition properties into a single property

Answer: • transition

Question:* p.outset {border-style: outset; } In the code snippet above, which part represents the property?

Answer: • border-style

Question:* Fonts such as Times New Roman which have spaces in between must be wrapped inside ______

Answer: • Quotation Mark

Question:* Which of the following elements will be matched by the CSS selector: div[class*="foo"] ?

Answer: • All of these elements will be matched.

Question:* Write the css selector for the 3rd list item within an ordered list.

Answer: • li:nth-child(3) { // do something }

Question:* Which of the correct syntax css cursor code?

Answer: • p { cursor: wait } h4 { cursor: help } h5 { cursor: crosshair }

Question:* The First step of transition is

Answer: • transition-property

Question:* Which of the following elements will be matched by this CSS selector: div[class|="foo"] ?

Answer: • All of these elements will be matched.

Question:* 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.

Answer: • i-True, ii-True

Question:* The possible values of white-space are

Answer: • All are correct

Question:* The_____________ property indicates whether a cell without any content should have a border displayed.

Answer: • empty-cells

Question:* What CSS selector selects all elements with a target attribute?

Answer: • [target]

Question:* Which of the following color values is invalid?

Answer: • They're all valid.

Question:* The ................... property indicates whether a cell without any content should have a border displayed.

Answer: • empty-cells

Question:* Which of the following code samples could be used to style a link whose URL begins with "https://sales."?

Answer: • a[href^='https://sales.'] { color: pink; }

Question:* Which of the following is true about the overflow property?

Answer: • It specifies what happens if content overflows an element's box.

Question:* What does the following selector do: element[foo]

Answer: • Matches any element with the foo attribute set.

Question:* What does "Cascading" in CSS refer to?

Answer: • The hierarchy of rules which determines how element properties are inherited

Question:* The transition-duration property's initial value is 0, meaning that the transition is

Answer: • instantaneous

Question:* Which list-style-type property renders a filled circle?

Answer: • disc

Question:* Which HTML tag can be used to connect one page with an external resource?

Answer: • link

Question:* The Text spacing properties are

Answer: • All are correct

Question:* Does using or not using a doctype (in HTML) affect how CSS styles HTML? (also known as standards mode vs quirks mode)

Answer: • yes, it affects HTML rendering and CSS styling

Question:* Which value of the border style property can look as though it were embedded in the canvas?

Answer: • inset

Question:* Which type of border attribute can be used to have a unique look for each side of the border?

Answer: • border-(direction)

Question:* What is the border-spacing property?

Answer: • It sets the distance between the borders of adjacent cells (only for the "separated borders" model).

Question:* What does the following mean: ul[id^="name-here"]

Answer: • target any <ul> with an ID that starts with 'name-here'

Question:* True or False: The :first-line pseudo-element applies special styles to the contents of all but the first formatted line of a paragraph.

Answer: • False

Question:* Which properties allow specifying the formatting rules for the textual content on a Web page?

Answer: • CSS text

Question:* What colors are displayed when using six identical hexadecimal numbers to define color?

Answer: • white, gray or black

Question:* Which property is used to specify typefaces ?

Answer: • font-family

Question:* Which of the following properties is MOST likely to increase the amount of time it takes the browser to repaint?

Answer: • box-shadow

Question:* Which value will continue to display the text on the same line,until the BR element is specified?

Answer: • nowrap

Question:* Which of the following is invalid ?

Answer: • .selector { background-image: content("image.png"); }

Question:* In which position it will be calculated from the upper left corner of the parent layer?

Answer: • position:absolute

Question:* What is absolute positioning?

Answer: • When an element is positioned relative to the first parent element that has a position other than static.

Question:* A user can only view the border after specifying the

Answer: • All are correct

Question:* The ______________ property describes how the intermediate values used during a transition will be calculated

Answer: • transition-timing-function

Question:* The value of letter-spacing property is

Answer: • either normal or of length type

Question:* Which aspect of CSS has some direct resemblance with the common regular expression syntax?

Answer: • Attribute selectors

Question:* In which position will be calculated from that exact spot in the middle of your page where it was added?

Answer: • position:relative

Question:* Which part of the following selector does the browser parse first? ul > li a[title="home"]

Answer: • a[title="home"]

Question:* Which of the following selectors is the MOST efficient?

Answer: • #menu .text { ... }

Question:* In CSS tables, the possible values for the caption-side property can have the following values.

Answer: • top, bottom, left or right

Question:* What does the CSS cue property do?

Answer: • Specifies a sound to be played before and after the selected element

Question:* To style a link that ends in .html differently than a link that ends with another file extension you would use which code?

Answer: • a[href$='.html']{color: purple;}

Question:* Which value preserves the white spaces as specified in the content?

Answer: • pre

Question:* Which of the following is correct CSS syntex for using font property?

Answer: • <p style="font: italic bold 15px;"> ....................... </p>

Question:* Which of the following declarations is incorrect?

Answer: • table { display: table-column-grouped; }

Question:* Describes how the speed during a transition will be calculated. Default "ease"

Answer: • transition-timing-function

Question:* A Group of font families with a similar look

Answer: • generic family

Question:* Which property defines the distance between the nearest border edges of a marker and its associated principal box in an unordered list?

Answer: • marker-offset

Question:* A final property is the visibility property that will allow you to create

Answer: • invisible layers

Question:* Which is not a valid pseudo class?

Answer: • :nth

Question:* The color names are defined in the HTML and CSS color specification (___ standard colors plus ____ more).

Answer: • 17,124

Question:* In css border radius is not supported by Internet explorer version under

Answer: • 7

Question:* To use inline styles you use the style attribute in the ............... tag

Answer: • relevant tag

Question:* Which of the following declarations is incorrect?

Answer: • ul { list-style-type: roman; }

Question:* Which property is used to specify table borders in CSS?

Answer: • border

Question:* How do you add images to list items?

Answer: • list-style-image: url(../images/bullet.gif);

Question:* Which of the following is invalid ?

Answer: • .selector { background-image: content("image.png"); }

Question:* Which of these is NOT a CSS pseudo-class?

Answer: • a:blur

Question:* What is the order of precedence (highest to lowest) when applying styles?

Answer: • inline > embedded > external

Question:* To ensure consistent behavior when the user resizes text, font-size should be declared in units of:

Answer: • em

Question:* Which of the following code samples could be used to style a link whose URL begins with "https://sales."?

Answer: • a[href^='https://sales.'] { color: pink; }

Question:* All monospace characters have the same...

Answer: • width

Question:* What CSS syntax can be used to hide an image without affecting the documents layout?

Answer: • visibility: hidden

Question:* Does using or not using a doctype (in HTML) affect how CSS styles HTML? (also known as standards mode vs quirks mode)

Answer: • yes, it affects HTML rendering and CSS styling

Question:* Which of the following is true about the overflow property?

Answer: • It specifies what happens if content overflows an element's box.

Question:* Which version of CSS supports this tag :nth-child ?

Answer: • CSS 3

Question:* What would the following do? tr:nth-child(2n){background-color: red; }

Answer: • Changes the background color of every even number table row to red

Question:* The Hex color #0000FF is equal to:

Answer: • blue

Question:* What is the border-spacing property?

Answer: • It sets the distance between the borders of adjacent cells (only for the "separated borders" model).

Question:* What does the following mean: ul[id^="name-here"]

Answer: • target any <ul> with an ID that starts with 'name-here'

Question:* What property defines whether background images scroll along with the element when the document is scrolled?

Answer: • background-attachment

Question:* Which of the following is NOT a common browser layout engine that determines CSS default styles?

Answer: • Commando

Question:* A CSS ________ is a keyword added to selectors that specifies a special state of the element to be selected.

Answer: • pseudo-class

Question:* What is the name for a property that clears an area outside the border and is completely transparent?

Answer: • margin

Question:* What property is used with the :before and :after pseudo-elements to insert generated content?

Answer: • content

Question:* What does the outline-offset property do?

Answer: • Both of the other answers are correct.

Question:* Identify the selector in the following rule: h1 { color: blue; }

Answer: • h1

Question:* What does the outline-offset property do?

Answer: • Both of the other answers are correct.

Question:* Which of the following is true about inline styles?

Answer: • They will override a style defined inside the <head> tag, in an external style sheet or in a browser (a default value).

Question:* In which direction are elements floated?

Answer: • Horizontally

Question:* Which of the following is used to select one paticular tag, rather than a group of tags?

Answer: • Id selector

Question:* The pseudo selector ":nth-child(2n)" can also be written as:

Answer: • :nth-child(even)

Question:* 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?

Answer: • padding:10px 25px 7px 2px

Question:* The text-align property is used to set the ______ alignment of a text.

Answer: • horizontal

Question:* Which value of the "text-transform" property transforms the first character in each word to uppercase?

Answer: • capitalize

Question:* What is NOT a correct value of background-position property?

Answer: • middle

Question:* If an image is floated to the right, where does a following text flow?

Answer: • around it, to the left

Question:* Which of the following css declarations will create italicized text?

Answer: • {font-style: italic;}

Question:* Which property specifies spacing behavior between text characters?

Answer: • letter-spacing

Question:* What is true about image sprites?

Answer: • Both of these

Question:* 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?

Answer: • fixed

Question:* What property is used to specify the indentation of the first line of a text?

Answer: • text-indentation

Question:* In this code, where will the <p> element be displayed? <body> <div style="position:relative"> <p style="position:absolute; bottom:0;"> </p> </div> </body>

Answer: • At the bottom of the <div> element

Question:* How do you hide an element, but have it still take up space and affect the layout?

Answer: • visibility: hidden;

Question:* What is the scale for opacity from least to most?

Answer: • 0 - 1

Question:* Is a # required before colors in CSS?

Answer: • No, only when specifying colors as hexadecimal values.

Question:* Which operator is used for pseudo classes?

Answer: • : (colon)

Question:* The caption-side property specifies the placement of a table caption. Which of the following is NOT a valid value?

Answer: • side

Question:* 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?

Answer: • justify

Question:* What is "inline" for the CSS display property?

Answer: • An inline element has no line break before or after it, and it tolerates HTML elements next to it.

Question:* What does "padding:15px 20px 25px" mean?

Answer: • - top padding is 15px - right and left paddings are 20px - bottom padding is 25px

Question:* In this CSS code, what element is the property? table {color: red;}

Answer: • color

Question:* By default, the background-image property repeats an image...

Answer: • both horizontally and vertically

Question:* What is the syntax for a customized cursor?

Answer: • Selector {cursor:value}

Question:* display:none hides an element, and it will...

Answer: • not take up any space. The element will be hidden, and the page will be displayed as the element is NOT there

Question:* Which of the following specifies the type of list-item marker?

Answer: • list-style-type

Question:* Given the following css rule, where would the style apply? #content table tr td ul li a {font-weight:bold;}

Answer: • Links inside of a list inside of a table inside of an element with an id of 'content'

Question:* How do you target the submit button for the <form id="example">?

Answer: • #example input[type="submit"]

Question:* Given .class { padding: 20px 10px; }, in what order do padding values apply?

Answer: • top & bottom, left & right

Question:* Which of the following applies a different background color for odd numbered rows in a given table?

Answer: • tr:nth-child(odd)

Question:* 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?

Answer: • CSS Image Sprites

Question:* What does the * stand for in CSS?

Answer: • Universal Selector

Question:* Where is the margin property located in the CSS box model?

Answer: • Outside the box

Question:* Which declaration removes bullets from a navigation list?

Answer: • list-style-type:none

Question:* What are the differences between "display:none" and "visibility:hidden" code?

Answer: • "display:none" hides the element and remove it's placeholder, "visibility:hidden" hides the element but keeps it's place blank.

Question:* What does image sprite do in CSS?

Answer: • It is a collection of images put into a single image.

Question:* You have three blocks of code that share property values. Which of the following ways is the most efficient?

Answer: • .one, .two, .three { property: value; }

Question:* 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?

Answer: • div {margin: 5px 2px 0 10px}

Question:* Of the following elements, which will be frontmost, on the top of the stack using z-index?

Answer: • Element with z-index of 9

Question:* What HTML tag can you use to import a style sheet into a document?

Answer: • Use the HTML <link /> tag, like this: <link rel='stylesheet' type='text/css' href='styles.css' /> .

Question:* In CSS3, which property is used to make sure a given element has a width of at least a set value?

Answer: • min-width

Question:* What does XSL, another style sheet language for XHTML, stand for?

Answer: • Extensible Stylesheet Language

Question:* If the name of a font family is more than one word, it must be in quotation marks.

Answer: • True

Question:* What is the CSS syntax for changing the default cursor to a pointing finger?

Answer: • cursor: pointer;

Question:* What of the following is the correct syntax in CSS?

Answer: • Selector {Property: Value;}

Question:* What does the list-style-position property do?

Answer: • It specifies if the list-item markers should appear inside or outside the content flow.

Question:* Which of the following is the correct syntax for a pseudo-class?

Answer: • selector:pseudo-class { ... }

Question:* Which of the following will remove the default underline under the link with an id of "content"?

Answer: • a#content {text-decoration:none;}

Question:* Which declaration can be used to have a block element always displays scrollbars?

Answer: • {overflow:scroll}

Question:* When adjusting a CSS sprite, which property do you use?

Answer: • background-position

Question:* Which property is used to set whether table borders are collapsed into a single border or detached as in standard HTML?

Answer: • border-collapse

Question:* What css selector selects the input element which has focus?

Answer: • input:focus

Question:* 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?

Answer: • <do></do>

Question:* If an image is floated to the right, the following text flows around it...

Answer: • to the left

Question:* What css selector selects all <div> elements and all <p> elements?

Answer: • div,p

Question:* On which position value does the z-index property work?

Answer: • all of the answers

Question:* Which declaration will make each word in an element start with a uppercase letter?

Answer: • text-transform: capitalize;

Question:* 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

Answer: • #home:target

Question:* To specify the style for a list, use the _________ property.

Answer: • list-style

Question:* In the CSS box model, where is the margin located?

Answer: • Immediately outside the box border

Question:* Which of the following produces a black border that is 1-pixel thick and dashed?

Answer: • border: 1px dashed #000

Question:* Which style does the following rule apply to? div.wrapper h2 { font-size: 18px; margin-top: 0px; }

Answer: • h2 heading inside element div of class wrapper

Question:* What does minifying CSS do?

Answer: • compresses the code by removing whitespace, which is not needed

Question:* An ____ style loses many of the advantages of style sheets by mixing content with presentation.

Answer: • Inline

Question:* What css selector selects every element that is not a <p> element?

Answer: • :not(p)

Question:* Which property is used to horizontally align the text in the table?

Answer: • text-align

Question:* Which style will cause all links to "http://www.smarterer.com" to be blue?

Answer: • a[href="http://www.smarterer.com"] { color: blue; }

Question:* Which syntax does older versions of Internet Explorer use for transparency?

Answer: • filter:alpha(opacity=x).

Question:* Which measurement can't be used to size text in CSS?

Answer: • huge

Question:* How do you apply multiple classes to an element?

Answer: • <div class="class1 class2" ></div>

Question:* If table {color: red;} is specified in a stylesheet, what happens to the table?

Answer: • Text within it is red

Question:* How can you override css cascade priority and force a particular css rule to apply?

Answer: • p { color:red !important; }

Question:* Which of the following is true about vertical-align property?

Answer: • It sets the vertical alignment of an element.

Question:* How do you remove browser default margin and padding settings?

Answer: • Set margin and padding to 0

Question:* Which is the correct syntax for referring to a pseudo-class?

Answer: • :hover

Question:* Block elements can be aligned to center by setting the left and right...

Answer: • margins to auto

Question:* Every CSS style definition has two components. What are they?

Answer: • selector, properties

Question:* Which of the following selects all unvisited links?

Answer: • :link

Question:* How do you set a paragraph to have a border of 5px in red color?

Answer: • p { border:5px solid red; }

Question:* Which HTML tag is used to define an embedded style sheet?

Answer: • <style>

Question:* What is the child selector in css?

Answer: • >

Question:* Normally, elements after a 'floated' element will flow around it. Which property can be used to avoid this?

Answer: • the clear property

Question:* 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?

Answer: • overflow: auto

Question:* Which of the following properties can be used to add space outside an element's box?

Answer: • margin

Question:* True or False : CSS class name starting with a number is supported by all browsers.

Answer: • False

Question:* Which of the following is true about border styles?

Answer: • None of these

Question:* Which of the following is NOT a valid image opacity rule?

Answer: • opacity: 2.0;

Question:* What css selctor Selects every <p> element that is the last child of its parent?

Answer: • p:last-child

Question:* What does the property text-align:center; do?

Answer: • Aligns text in horizontal center of the containing element

Question:* With what characters are CSS declarations separated?

Answer: • semicolon ( ; )

Question:* What does the child selector (">") do?

Answer: • Matches elements that are a direct child of the parent match

Question:* When using the background-color property with rgba(255, 0, 255, 0.5) what does the "a" refer to?

Answer: • Opacity (Alpha channel)

Question:* In this CSS code, what element is the selector? table {color: red;}

Answer: • table

Question:* What css selector selects all <p> elements that are contained inside of an element with an ID of 'content'?

Answer: • #content p

Question:* An attribute selector allows you to select an element with a specific attribute. To select a <input type="submit"> you would use:

Answer: • input[type=submit] { }

Question:* What rule is generally used, for responsive web design, to target devices with different widths?

Answer: • @media

Question:* How do you hide an element and remove it from the document flow?

Answer: • Add "display: none" to your style sheet rule.

Question:* With what characters are multiple fonts separated with?

Answer: • commas

Question:* When using z-index which other property is required?

Answer: • position

Question:* Which of the following sets all the border properties in one declaration?

Answer: • border

Question:* How can you create responsive websites through css?

Answer: • Use an @media query.

Question:* What is the correct pseudo-class for modifying only the first element of a selector?

Answer: • :first-child

Question:* What does the pseudo class last-child do?

Answer: • selects the last element in a targeted parent element.

Question:* Which of the following will apply a hex color of #445566 to each active link?

Answer: • a:active {color:#445566;}

Question:* What are the three methods for implementing a stylesheet?

Answer: • Inline, Embedded, and External

Question:* What is the correct shorthand syntax for a border?

Answer: • border: 1px solid #777;

Question:* Which line changes the background color of a link when a visitor hovers it?

Answer: • a:hover { background-color: #FF704D; }

Question:* In CSS, the term "box model" is used when talking about?

Answer: • design and layout

Question:* Which of the following has the highest priority?

Answer: • Inline style (inside an HTML element)

Question:* Which of the following is the correct syntax for using z-index?

Answer: • img {z-index:-1;}

Question:* How will this display: margin: 10px 5px;

Answer: • Top: 10px, right: 5px, bottom:10px, left:5px

Question:* What attribute is NOT required when using the <link> tag?

Answer: • head

Question:* Which of these examples of using the clear property are correct?

Answer: • .text_line { clear:both; }

Question:* How much space does an element take up within the document (on modern browsers) if it has "display: none" styling applied?

Answer: • It will not take up any space.

Question:* Which of the following is the correct syntax for importing one style sheet into another?

Answer: • @import url("other.css");

Question:* Which of the following defines the boundary within the element box against which background-image positioning is calculated?

Answer: • background-origin

Question:* To create a border of 3-pixel width, which css declaration would you use?

Answer: • border-width: 3px;

Question:* Which of the following characters is used to begin a css declaration block?

Answer: • {

Question:* #container {margin: 20px 30px 10px 50px} The margin-right value will be...

Answer: • 30px

Question:* What are the three methods for using style sheets with a web page?

Answer: • Inline, embedded or document level and external

Question:* You can apply a style to a selector within a selector without affecting the same selector outside the parent selector.

Answer: • True

Question:* Which property controls the additional space between the selected element(s) border and its content?

Answer: • padding

Question:* Which of these has the highest priority?

Answer: • inline style

Question:* How do you specify 30% opacity in CSS (ignoring IE)?

Answer: • opacity: 0.3

Question:* How would you hide an element using the display property?

Answer: • display: none;

Question:* Which of the following declarations would display a list without bullets?

Answer: • list-style-type: none

Question:* By which of the following is a declaration terminated?

Answer: • ;

Question:* Which side of the element with ID 'element' will have a 10px margin? #element { margin: 0px 5px 10px 20px;}

Answer: • bottom

Question:* What selector is used to select all elements?

Answer: • *

Question:* How do you set the text color in a css rule?

Answer: • color:

Question:* Can web fonts be imported with .css files directly

Answer: • Yes, by using @import url("fontname");

Question:* What is one way to center a fixed-width element (relative to its container)?

Answer: • margin: 0 auto;

Question:* Which attribute creates space between content and its container?

Answer: • padding

Question:* Which of the following is correct to transform text into uppercase?

Answer: • h1 {text-transform:uppercase;}

Question:* Which of the following selects the active link?

Answer: • :active

Question:* Which of the following sets the stack order of a positioned element?

Answer: • z-index

Question:* Which of the following elements takes up the full width available, and has a line break before and after it?

Answer: • Block element

Question:* What is the correct CSS syntax for making all the <p> elements bold?

Answer: • p { font-weight: bold; }

Question:* Which css rule will make an element with an id of "box" invisible?

Answer: • #box {visibility:hidden}

Question:* What is the difference between margin and padding?

Answer: • Margin is on the outside of block elements while padding is on the inside.

Question:* Which of the following units of measurement can be used when creating a margin?

Answer: • All of these

Question:* Which of the following will set h1 to 16 pixels, bold, and underline?

Answer: • h1 {font-size: 16px; font-weight: bold; text-decoration: underline;}

Question:* How can you assign a higher specificity to a property value?

Answer: • body { background: blue !important; }

Question:* Which of the following removes the bullet from an unordered list?

Answer: • list-style-type: none;

Question:* 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?

Answer: • #box {border: 2px, 0px, 1px, 0px;}

Question:* Which of the following applies a 2D or 3D transformation to an element?

Answer: • transform

Question:* Which of these can be used to apply style rules to elements in a document?

Answer: • All of these

Question:* How can you add a comment to a stylesheet?

Answer: • Enclose comment between opening and closing comment markers as follows: /* and */

Question:* Selects all elements with class="intro"

Answer: • .intro

Question:* Which of the following sets all the properties for a list in one declaration?

Answer: • list-style

Question:* Which value is used to define a dashed border?

Answer: • dashed

Question:* What is a CSS rule?

Answer: • Statements that tell the web browser how to render certain element or elements on the page.

Question:* Which of the following is correct to transform text to lowercase?

Answer: • p {text-transform:lowercase;}

Question:* Which of the following will set Verdana as the entire page's font type?

Answer: • body {font-family: Verdana;}

Question:* What is CSS valid syntax for setting the margin value to 0?

Answer: • margin: 0;

Question:* Which of the following code elements will ensure that all images have no border?

Answer: • img { border: none; }

Question:* Which css property can be used to display text with all uppercase, all lowercase, or with forced first-letter capitalization?

Answer: • text-transform

Question:* The CSS3 property for transparency is...

Answer: • opacity

Question:* Which of the following always refers to text color?

Answer: • color

Question:* Which of the following pseudo-elements are invalid?

Answer: • ;last-paragraph

Question:* Which are the two main parts of a CSS rule?

Answer: • Selector and Declaration

Question:* What css selector selects the document’s root element

Answer: • :root

Question:* What property can be used to turn everything into uppercase or lowercase letters, or capitalize the first letter of each word?

Answer: • text-transform

Question:* Which answer is equivalent to this: h1 { font-family: sans-serif; } h2 { font-family: sans-serif; } h3 { font-family: sans-serif; }

Answer: • h1, h2, h3 { font-family: sans-serif; }

Question:* What property is used to a set minimum height for an element?

Answer: • min-height

Question:* What does the property font-family do?

Answer: • Specifies which font to use

Question:* With these specifications, how will the paddings appear in browser? padding: 6px 3px 0px 3px;

Answer: • top: 6px, right: 3px, bottom: 0px, left: 3px,

Question:* On which side will there be a 20px padding if this is the specified: padding: 30px 15px 20px 10px;

Answer: • bottom

Question:* Which property specifies the spacing between lines?

Answer: • line-height

Question:* What css selector Insert content before every <p> element

Answer: • p:before

Question:* Which HTML tag is used to define an internal style sheet?

Answer: • <style>

Question:* In margin: 10px 20px 40px 30px; what will be the bottom margin?

Answer: • 40px

Question:* Which of the following is an example of using group selectors?

Answer: • h1, h2, p { color:green;}

Question:* True or False: Hexadecimal color values are supported in all major browsers.

Answer: • True

Question:* Which answer best describes the following statement? <div style="text-align:center; font-size: 14px;"></div>

Answer: • Inline CSS

Question:* What color does this hexadecimal code represent: #000?

Answer: • black

Question:* How do you display hyperlinks without an underline?

Answer: • a {text-decoration:none}

Question:* Which of the following css declarations will create bold text?

Answer: • {font-weight: bold;}

Question:* Which of the following is NOT a valid technique for applying styles to a document?

Answer: • exceptional styles

Question:* What is the correct method of changing text color?

Answer: • {color:#000000;}

Question:* What is the main difference between styling a <span> and a <div> element?

Answer: • <span> is an inline element by default, while <div> is a block element.

Question:* Is :focus a pseudo-class?

Answer: • Yes

Question:* What property changes the text color of an element?

Answer: • color

Question:* Which of the following is NOT a CSS font property?

Answer: • font-invariant

Question:* Which of the following css declarations would style hyperlinks using sans-serif fonts?

Answer: • a:link {font-family: "lucida sans unicode", sans-serif;}

Question:* What is the correct selector format for ID elements in CSS, where id_name is unique ID name to be formatted?

Answer: • #id_name { }

Question:* How would you define class 'myclass' that sets the width of an element to 640px and the height to 480px ?

Answer: • .myclass {width: 640px; height: 480px;}

Question:* Internet Explorer supports the fixed value only if...

Answer: • !DOCTYPE is specified.

Question:* Setting the left and right margins to auto specifies that they should split the available margin equally, resulting in...

Answer: • a centered element

Question:* How do you designate an inline style?

Answer: • style = " "

Question:* With what character does a declaration block start and end with?

Answer: • starts with { and ends with }

Question:* What does the float property do?

Answer: • Aligns HTML elements to the right or left while allowing content to flow around it

Question:* What can CSS selectors look for?

Answer: • all of these

Question:* What is the difference between ID and Class?

Answer: • You can use multiple classes on the same element, but you can't do that with ID's

Question:* Which of the following CSS3 properties is used to round the corners of elements?

Answer: • border-radius

Question:* What property is used to a set maximum height for an element?

Answer: • max-height

Question:* Which of the following will set the entire page background color?

Answer: • body {background-color:#FFFFFF;}

Question:* In which example below will all HTML elements with class="master" will be center-aligned?

Answer: • .master {text-align:center;}

Question:* Which of the following defines the tiling pattern for one or more background images?

Answer: • background-repeat

Question:* When does aligning a block element have no effect?

Answer: • when it's width is set to 100%

Question:* The background image for a page can be set like this:

Answer: • body {background-image:url('sand.gif');}

Question:* Block elements can be centered by setting the left and right margins to:

Answer: • auto

Question:* Which CSS property controls the text size?

Answer: • font-size

Question:* Where in an HTML document is the correct place to refer to an external style sheet?

Answer: • In the <head> section

Question:* A class is prefaced by what symbol?

Answer: • .

Question:* To set the bottom border width...

Answer: • border-bottom-width:15px;

Question:* 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)" />

Answer: • This image will be partially transparent.

Question:* What is the best way to insert CSS styles across multiple HTML files?

Answer: • External CSS

Question:* Which HTML attribute is used to define inline styles?

Answer: • style

Question:* The id selector uses the id attribute of the HTML element, and is defined with a...

Answer: • "#"

Question:* Is this a proper statement? body { font-family: Arial, Helvetica, sans-serif; color: #000; background-color: #FFF; }

Answer: • Yes

Question:* What does the border-radius property do?

Answer: • Creates rounded corners

Question:* Which CSS property contains the following attributes: normal, italic, oblique

Answer: • font-style

Question:* Hex colors are based off of what other web based color mode?

Answer: • RGB

Question:* Which of the following places one or more images in the background of the element?

Answer: • background-image

Question:* What does background-origin property do?

Answer: • It specifies the positioning area of the background images.

Question:* Which property is used to control the space between the border and content in a table?

Answer: • padding

Question:* Which tag is used to link External Style Sheets?

Answer: • <link>

Question:* Which answer best describes the following css rule? a {text-decoration:none;}

Answer: • Links will be styled with no underlines

Question:* Pseudo-elements can be combined with CSS classes.

Answer: • True

Question:* In CSS, it is possible to specify different padding for different sides?

Answer: • Yes

Question:* Which of the following is true for setting font type?

Answer: • p { font-family:"Times New Roman",Georgia,Serif; }

Question:* How do you add a background color?

Answer: • div {background-color : red}

Question:* 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>

Answer: • If the link in the example has been visited, it will be displayed in red

Question:* What does CSS stand for?

Answer: • Cascading Style Sheets

Question:* .center {text-align:center;} is an example of

Answer: • the class Selector

Question:* What is the default file extension for a CSS style sheet?

Answer: • .css

Question:* Which is the correct CSS syntax?

Answer: • body {color: black}

Question:* Which of these is the correct format for specifying a color?

Answer: • All of the above

Question:* Which is the correct syntax for centering the text in the header?

Answer: • h1 {text-align: center;}

Question:* How do you add a background color for all "<h1>" elements?

Answer: • h1 { background-color: #FFFFFF; }

Question:* What pseudo-class need to be used to style a link which has the mouse over it?

Answer: • a:hover

Question:* Which of the following sets how a background image will be repeated?

Answer: • background-repeat

Question:* What does the scale() method do?

Answer: • It increases or decreases the size of element

Question:* Where in an HTML document is the correct place to refer to an external style sheet?

Answer: • In the <head>

Question:* Which of the following properties is used to set a minimum width on an element?

Answer: • min-width

Question:* Which is the correct way to write a comment in CSS?

Answer: • /*This is a comment*/

Question:* Which of these is the correct way to specify color?

Answer: • All of these

Question:* Which syntax displays hyperlinks with an underline?

Answer: • a {text-decoration: underline}

Question:* Colors in CSS can be specified by the following methods:

Answer: • All of these

Question:* How do you add a background color for all <h1> elements?

Answer: • h1 { background-color: #FFF; }

Question:* What symbol do you use in CSS to call out to an ID?

Answer: • #

Question:* What is the correct HTML for referring to an external style sheet?

Answer: • <link rel="stylesheet" type="text/css" href="main.css">

Question:* Which CSS property controls the text size?

Answer: • font-size

Question:* Where in an HTML document is the correct place to refer to an external style sheet?

Answer: • In the <head> section

Question:* What css selector selects all elements?

Answer: • *

Question:* Which of the following increases or decreases the horizontal space between characters?

Answer: • letter-spacing

Question:* Which is the correct CSS syntax?

Answer: • selector { property: value; }

Question:* Dimension properties allow you to control:

Answer: • the height and width of an element

Question:* What do the height and width CSS dimension properties allow you to control?

Answer: • the height and width of an element

Question:* The outline property is used to control:

Answer: • all of these

Question:* Which of the following CSS declarations would change the border style?

Answer: • border-style: solid;

Question:* Which property is used to specify the kind of border to display?

Answer: • border-style

Question:* What property alters an elements background color?

Answer: • background-color

Question:* Who maintains CSS?

Answer: • W3C

Question:* Which tag is used to define an Internal Style Sheet?

Answer: • <style>

Question:* Which of these is not a vendor prefix?

Answer: • They are all vendor prefixes.

Question:* The class selector is used to specify a style for:

Answer: • a group of elements

Question:* What is the correct HTML for referring to an external style sheet?

Answer: • <link rel="stylesheet" type="text/css" href="mystyle.css">

Question:* What are the possible values of the property background-attachment?

Answer: • Both scroll and fixed

Question:* Which HTML tag is used to define an internal style sheet?

Answer: • <style>

Question:* Which element/pseudo-element pair can be used to create a mouseover effect on all links?

Answer: • a:hover

Question:* CSS stands for

Answer: • Cascading Style Sheets

Question:* Which of the following characters is used to end a css declaration block?

Answer: • }

Question:* Which is the correct CSS syntax?

Answer: • body { color: red; }

Question:* Which property is used to change the background color?

Answer: • background-color:

Question:* Which of these is the correct CSS syntax for specifying the left margin of an element?

Answer: • p {margin-left:20px;}

Question:* In an HTML document, where is the correct place to refer to an external CSS file?

Answer: • In the <head> section

Question:* When does the link state a:hover occur?

Answer: • When the user mouses over it

Question:* Which answer best describes the purpose of the following markup? <link rel="stylesheet" href="style.css" type="text/css" />

Answer: • To call an external stylesheet

Question:* Which of the following is NOT a web-safe font?

Answer: • Zapfino

Question:* Which of the following determines whether the text should be displayed as italics or regular text?

Answer: • font-style

Question:* Which symbol is used to define an ID?

Answer: • # (pound sign)

Question:* What does the background-color property do?

Answer: • Specifies the background color of an element

Question:* What is the extension for an external style sheet?

Answer: • .css

Question:* The background color can be specified by:

Answer: • All of these

Question:* Which character, followed by the selector's name, is used for defining ID selectors?

Answer: • #

Question:* Which properties can be applied to first-line pseudo-element?

Answer: • All of these

Question:* What should CSS be used for?

Answer: • styling

Question:* .css files may be created using what software?

Answer: • All of these, any text editor will do.

Question:* Which contemporary web browser(s) support CSS?

Answer: • All of these

Question:* Which CSS property controls the text size?

Answer: • font-size

Question:* The default value of the font-variant property is

Answer: • normal

Question:* 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?

Answer: • Responsive

Question:* Which property can be used to set the color of a text?

Answer: • color

Question:* An id is prefaced by what symbol?

Answer: • #

Question:* What is the correct HTML for referring to an external style sheet?

Answer: • <link rel="stylesheet" type="text/css" href="mystyle.css">

Question:* Where in an HTML document is the correct place to refer to an external style sheet?

Answer: • In the <head> section

Question:* What does CSS stand for?

Answer: • Cascading Style Sheets

Question:* What does CSS stand for?

Answer: • Cascading Style Sheets

Question:* Which configuration of the web elements in the page markup gives you great flexibility in the design of your site?

Answer: • All are correct

Question:* What is the correct HTML for referring to an external style sheet?

Answer: • <link rel="stylesheet" type="text/css" href="main.css">

Question:* Which is the correct CSS syntax?

Answer: • selector { property: value; }

Question:* Where in an HTML document is the correct place to refer to an external style sheet?

Answer: • In the <head>

Question:* Where in an HTML document is the correct place to refer to an external style sheet?

Answer: • In the <head> section

Question:* Which is the correct CSS syntax?

Answer: • body {color: black}

Question:* How do you add a background color for all <h1> elements?

Answer: • h1 {background-color:#FFFFFF;}

Question:* The id selector uses the id attribute of the HTML element, and is defined with a

Answer: • "#"

Question:* What does CSS stand for?

Answer: • Cascading Style Sheets

Question:* Where in an HTML document is the correct place to refer to an external style sheet?

Answer: • In the <head> section

Question:* Which is the correct syntax of the background color for links?

Answer: • a:link {background-color:#B2FF99;}

Question:* Which property can be used, along with a position property, to create an effect of layers?

Answer: • z-index

Question:* The _________ means an element that has the user's mouse pointer hovering over it.

Answer: • a:hover

Question:* Which CSS property can provide to add an effect when changing from one style to another,without using Flash animations or javascript?

Answer: • Transitions

Question:* Which is the correct CSS syntax?

Answer: • <p style="text-align:left;color:#00CC00"> This text is in left. </p>

Question:* Which property can be used to control the flow and formatting of text?

Answer: • white-space

Question:* How do you make the text bold?

Answer: • font-weight:bold

Question:* Which of the following ways below is correct to write a CSS?

Answer: • body {color: black}

Question:* Negative values for transition-duration are treated as

Answer: • 0

Question:* The ..................... specifies whether a border should be solid, dashed line, doted line, double line, groove etc.

Answer: • border-style

Question:* They must be define a border-style for the border to show up. Available terms:

Answer: • All are correct

Question:* A ___________ property can help you to create more complex webpage layouts

Answer: • z-index

Question:* The CSS list properties allow you to:

Answer: • All are correct

Question:* What does CSS define in HTML?

Answer: • How to display HTML elements

Question:* CSS colors are defined using a _________ notation for the combination of Red, Green, and Blue color values (RGB).

Answer: • hexadecimal

Question:* The <link> tag goes inside

Answer: • The head section

Question:* How to apply the text-shadow around the text?

Answer: • <p style="text-shadow:6px 6px 10px #FF0000 "> Text-shadow is of red color. </p>

Question:* Which states whether the text is underlined or not?

Answer: • text-decoration:

Question:* ...................... is used to import an external style sheet in a manner similar to the <link> element.

Answer: • @import

Question:* The ________________ specifies whether a border should be solid, dashed line, doted line, double line, groove etc.

Answer: • border-style

Question:* In reality layers are often used in more dynamic ways:

Answer: • All are correct

Question:* Which properties is used to change the case of the text?

Answer: • text-transform:

Question:* Which is the correct syntax of css border?

Answer: • .two { border: solid 6px #fff; position: relative; z-index: 1; }

Question:* True or False? With CSS, it's possible to customize the numbers that appear next to list items within <ol> elements.

Answer: • True

Question:* Which property can be used to decorate links by specifying no underline with the text?

Answer: • text-decoration:none

Question:* True or False: The universal selector, written "*", matches the name of any element type. It matches any single element in the document tree.

Answer: • True

Question:* The ___________ property allows to specify how much space appear between the content of an element and it's border.

Answer: • padding

Question:* __________ property is mostly used to remove underlines from links:

Answer: • text-decoration

Question:* 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.

Answer: • list-style-type

Question:* The text-decoration are:

Answer: • All are correct

Question:* Which is the correct CSS syntax?

Answer: • <p style="direction:inherit"> Possible values are ltr,rtl and inhert. </p>

Question:* The ____________ property allows to specify how much space appear between the content of an element and it's border.

Answer: • Padding

Question:* Which Represents a line that acts as a boundary?

Answer: • Border

Question:* How do you make a list that lists its items with squares?

Answer: • list-style-type: square

Question:* A ......... tag is used to specify that the browser is to fetch and use an external style sheet file

Answer: • <link>

Question:* Which property can be used to specify all the list properties into a single expression?

Answer: • list-style

Question:* Which styles of border can be look in dotted?

Answer: • border-style: dotted;

Question:* To create a layer all you need to do is assign the _______ attribute to your style

Answer: • position

Question:* Which property gets provide the increments or decrements the space between characters?

Answer: • letter-spacing

Question:* Hex values are written as 3 double digit numbers, starting with a

Answer: • # sign

Question:* CSS comments are inserted inside .

Answer: • /*..................*/

Question:* Which is the correct syntax of the CSS?

Answer: • <p style="font-size:14pt"> Welcome to teds-india.</p>

Question:* What are the two components of every CSS style definition?

Answer: • selector, properties

Question:* What do the Greater Than sign > indicate in CSS

Answer: • Select the child of the element it follows

Question:* What is the correct way to set the color of hover links?

Answer: • <style type="text/css"> a:hover {color:#000000} </style>

Question:* The id selector is used to specify a style for

Answer: • single, unique element

Question:* p { width:220px; padding:10px; border:5px solid gray; margin:0px; } The total width of an element is calculated like this:

Answer: • Total element width = width + left padding + right padding + left border + right border + left margin + right margin

Question:* Which concept uses the CSS from which implies that every HTML element is a box?

Answer: • box model

Question:* Which of the syntax is correct?

Answer: • <div style="position:relative; font-size:50px; z-index:2;">LAYER 1</div>

Question:* Which part of the box, where text and images appear?

Answer: • Content

Question:* The completion of a CSS Transition generates a corresponding

Answer: • DOM Event

Question:* The correct example of class selector is .

Answer: • h2.type1 {color: #000000;}

Question:* Pseudo classes may be applied to any element but are most commonly used with the __ element.

Answer: • 'a'

Question:* Multiple font faces are separated by __________

Answer: • Comma

Question:* Which is the correct CSS syntax?

Answer: • <p style="direction:ltr"> This text is in left direction. </p>

Question:* The following syntax to set margin around a paragraph will make- p{margin:10px 2%}

Answer: • Top and bottom margin will be 10px and left and right margin will be 2% of the total width.

Question:* The possible values of white-space are

Answer: • <p style="white-space:normal"> Use of normal white-space. </p>

Question:* What property is used to specify the indentation of the first line of a text?

Answer: • text-indent

Question:* What does a 'position: fixed;' declaration accomplish?

Answer: • Fixes the element relative to the browser's viewport

Question:* You have three blocks of markup that share property values. Which of the following ways is the most efficient?

Answer: • .one, .two, .three { property: value; }

Question:* Which values can be used to set text direction?

Answer: • ltr and rtl

Question:* An outline is always placed __________ of the box

Answer: • Outline

Question:* The_________ means unvisited hyperlinks.

Answer: • :link

Question:* Which two properties are the defaults when positioning a layer?

Answer: • top, left

Question:* The transition-duration property is in fact the only property required

Answer: • All are correct

Question:* What CSS selector selects all elements with a target attribute?

Answer: • [target]

Question:* ____________ properties provide several options to place the content on the web page.

Answer: • Positioning

Question:* Which properties specifying whether to write the text from left to right or from right to left?

Answer: • direction

Question:* A shorthand property for setting the four transition properties into a single property

Answer: • transition

Question:* p.outset {border-style: outset; } In the code snippet above, which part represents the property?

Answer: • border-style

Question:* Fonts such as Times New Roman which have spaces in between must be wrapped inside ______

Answer: • Quotation Mark

Question:* Which of the following elements will be matched by the CSS selector: div[class*="foo"] ?

Answer: • All of these elements will be matched.

Question:* Write the css selector for the 3rd list item within an ordered list.

Answer: • li:nth-child(3) { // do something }

Question:* Which of the correct syntax css cursor code?

Answer: • p { cursor: wait } h4 { cursor: help } h5 { cursor: crosshair }

Question:* The First step of transition is

Answer: • transition-property

Question:* Which of the following elements will be matched by this CSS selector: div[class|="foo"] ?

Answer: • All of these elements will be matched.

Question:* 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.

Answer: • i-True, ii-True

Question:* The possible values of white-space are

Answer: • All are correct

Question:* The_____________ property indicates whether a cell without any content should have a border displayed.

Answer: • empty-cells

Question:* What CSS selector selects all elements with a target attribute?

Answer: • [target]

Question:* Which of the following color values is invalid?

Answer: • They're all valid.

Question:* The ................... property indicates whether a cell without any content should have a border displayed.

Answer: • empty-cells

Question:* Which of the following code samples could be used to style a link whose URL begins with "https://sales."?

Answer: • a[href^='https://sales.'] { color: pink; }

Question:* Which of the following is true about the overflow property?

Answer: • It specifies what happens if content overflows an element's box.

Question:* What does the following selector do: element[foo]

Answer: • Matches any element with the foo attribute set.

Question:* What does "Cascading" in CSS refer to?

Answer: • The hierarchy of rules which determines how element properties are inherited

Question:* The transition-duration property's initial value is 0, meaning that the transition is

Answer: • instantaneous

Question:* Which list-style-type property renders a filled circle?

Answer: • disc

Question:* Which HTML tag can be used to connect one page with an external resource?

Answer: • link

Question:* The Text spacing properties are

Answer: • All are correct

Question:* Does using or not using a doctype (in HTML) affect how CSS styles HTML? (also known as standards mode vs quirks mode)

Answer: • yes, it affects HTML rendering and CSS styling

Question:* Which value of the border style property can look as though it were embedded in the canvas?

Answer: • inset

Question:* Which type of border attribute can be used to have a unique look for each side of the border?

Answer: • border-(direction)

Question:* What is the border-spacing property?

Answer: • It sets the distance between the borders of adjacent cells (only for the "separated borders" model).

Question:* What does the following mean: ul[id^="name-here"]

Answer: • target any <ul> with an ID that starts with 'name-here'

Question:* True or False: The :first-line pseudo-element applies special styles to the contents of all but the first formatted line of a paragraph.

Answer: • False

Question:* Which properties allow specifying the formatting rules for the textual content on a Web page?

Answer: • CSS text

Question:* What colors are displayed when using six identical hexadecimal numbers to define color?

Answer: • white, gray or black

Question:* Which property is used to specify typefaces ?

Answer: • font-family

Question:* Which of the following properties is MOST likely to increase the amount of time it takes the browser to repaint?

Answer: • box-shadow

Question:* Which value will continue to display the text on the same line,until the BR element is specified?

Answer: • nowrap

Question:* Which of the following is invalid ?

Answer: • .selector { background-image: content("image.png"); }

Question:* In which position it will be calculated from the upper left corner of the parent layer?

Answer: • position:absolute

Question:* What is absolute positioning?

Answer: • When an element is positioned relative to the first parent element that has a position other than static.

Question:* A user can only view the border after specifying the

Answer: • All are correct

Question:* The ______________ property describes how the intermediate values used during a transition will be calculated

Answer: • transition-timing-function

Question:* The value of letter-spacing property is

Answer: • either normal or of length type

Question:* Which aspect of CSS has some direct resemblance with the common regular expression syntax?

Answer: • Attribute selectors

Question:* In which position will be calculated from that exact spot in the middle of your page where it was added?

Answer: • position:relative

Question:* Which part of the following selector does the browser parse first? ul > li a[title="home"]

Answer: • a[title="home"]

Question:* Which of the following selectors is the MOST efficient?

Answer: • #menu .text { ... }

Question:* In CSS tables, the possible values for the caption-side property can have the following values.

Answer: • top, bottom, left or right

Question:* What does the CSS cue property do?

Answer: • Specifies a sound to be played before and after the selected element

Question:* To style a link that ends in .html differently than a link that ends with another file extension you would use which code?

Answer: • a[href$='.html']{color: purple;}

Question:* Which value preserves the white spaces as specified in the content?

Answer: • pre

Question:* Which of the following is correct CSS syntex for using font property?

Answer: • <p style="font: italic bold 15px;"> ....................... </p>

Question:* Which of the following declarations is incorrect?

Answer: • table { display: table-column-grouped; }

Question:* Describes how the speed during a transition will be calculated. Default "ease"

Answer: • transition-timing-function

Question:* A Group of font families with a similar look

Answer: • generic family

Question:* Which property defines the distance between the nearest border edges of a marker and its associated principal box in an unordered list?

Answer: • marker-offset

Question:* A final property is the visibility property that will allow you to create

Answer: • invisible layers

Question:* Which is not a valid pseudo class?

Answer: • :nth

Question:* The color names are defined in the HTML and CSS color specification (___ standard colors plus ____ more).

Answer: • 17,124

Question:* In css border radius is not supported by Internet explorer version under

Answer: • 7

Question:* To use inline styles you use the style attribute in the ............... tag

Answer: • relevant tag

Question:* Which of the following declarations is incorrect?

Answer: • ul { list-style-type: roman; }

Question:* Which property is used to specify table borders in CSS?

Answer: • border

Question:* How do you add images to list items?

Answer: • list-style-image: url(../images/bullet.gif);

Question:* Which of the following is invalid ?

Answer: • .selector { background-image: content("image.png"); }

Question:* Which of these is NOT a CSS pseudo-class?

Answer: • a:blur

Question:* What is the order of precedence (highest to lowest) when applying styles?

Answer: • inline > embedded > external

Question:* To ensure consistent behavior when the user resizes text, font-size should be declared in units of:

Answer: • em

Question:* Which of the following code samples could be used to style a link whose URL begins with "https://sales."?

Answer: • a[href^='https://sales.'] { color: pink; }

Question:* All monospace characters have the same...

Answer: • width

Question:* What CSS syntax can be used to hide an image without affecting the documents layout?

Answer: • visibility: hidden

Question:* Does using or not using a doctype (in HTML) affect how CSS styles HTML? (also known as standards mode vs quirks mode)

Answer: • yes, it affects HTML rendering and CSS styling

Question:* Which of the following is true about the overflow property?

Answer: • It specifies what happens if content overflows an element's box.

Question:* Which version of CSS supports this tag :nth-child ?

Answer: • CSS 3

Question:* What would the following do? tr:nth-child(2n){background-color: red; }

Answer: • Changes the background color of every even number table row to red

Question:* The Hex color #0000FF is equal to:

Answer: • blue

Question:* What is the border-spacing property?

Answer: • It sets the distance between the borders of adjacent cells (only for the "separated borders" model).

Question:* What does the following mean: ul[id^="name-here"]

Answer: • target any <ul> with an ID that starts with 'name-here'

Question:* What property defines whether background images scroll along with the element when the document is scrolled?

Answer: • background-attachment

Question:* Which of the following is NOT a common browser layout engine that determines CSS default styles?

Answer: • Commando

Question:* A CSS ________ is a keyword added to selectors that specifies a special state of the element to be selected.

Answer: • pseudo-class

Question:* What is the name for a property that clears an area outside the border and is completely transparent?

Answer: • margin

Question:* What property is used with the :before and :after pseudo-elements to insert generated content?

Answer: • content

Question:* What does the outline-offset property do?

Answer: • Both of the other answers are correct.

Question:* If an element appears before a floated element that element will...

Answer: • not be affected.

Question:* When using "position: absolute;" the reference point is the browser window UNLESS one of the parent elements contain one of the following...

Answer: • position: relative

Question:* What has the greatest specificity?

Answer: • #footer {background: white;}

Question:* Which property is used to specify type faces ?

Answer: • font-family

Question:* What character is used before the pseudo-class property?

Answer: • colon

Question:* What does a 'position: fixed;' declaration accomplish?

Answer: • Fixes the element relative to the browsers viewport

Question:* What does "Cascading" in CSS refer to?

Answer: • The hierarchy of rules which determines how element properties are inherited

Question:* Select the correct value to set the background to silver for even rows.

Answer: • tr:nth-child(2n) {background: silver;}

Question:* What does the background-attachment property do?

Answer: • It sets whether a background image should scroll with the content, or be fixed.

Question:* Where will a block level element appear in relations to the previous element in the document (by default)?

Answer: • Below the previous element

Question:* What is NOT an advantage of using CSS files?

Answer: • Ability to hide the CSS code from the user.

Question:* Which at-rule allows you to define custom fonts?

Answer: • @font-face { }

Question:* Pseudo-classes are used to represent _______.

Answer: • Dynamic Events

Question:* Which of the following best describes the effect that a floated element has on surrounding elements?

Answer: • The elements after the floating element will flow around it.

Question:* What does the following declaration accomplish? div{background-color: rgba(255,255,255,0.8); }

Answer: • It sets a white background with a transparency of 80% to the div element.

Question:* Given: table { color: blue; }, which part represents the property?

Answer: • color

Question:* Identify the value in the following rule: a:hover { text-decoration: none; }

Answer: • none

Question:* Which of the following color values is invalid?

Answer: • They're all valid.

Question:* What are the correct values for "float" property?

Answer: • left, right, none

Question:* What CSS selector selects all elements with a target attribute?

Answer: • [target]

Question:* Which selector specifies that a list uses squares?

Answer: • list-style-type: square;

Question:* What is the effect of the following css rule? [title]{color:blue;}

Answer: • All elements with a title attribute will be blue

Question:* The elements after the floating element will...

Answer: • flow around it

Question:* What is the purpose of line-height?

Answer: • Set the height for each line of text in an html element.

Question:* Which property is used to set all the outline properties in one declaration?

Answer: • outline

Question:* Which of the following tells the browser where you want to apply the rule?

Answer: • Selector

Question:* The box model consists of which of the following:

Answer: • margins,borders, padding, and the actual content

Question:* Which of the following is true for the max-width property?

Answer: • The max-width property does not include padding, borders, or margins.

Question:* how to set multiple images in background through css

Answer: • background-image: url(xyz.png), url(a2z.png);

Question:* Which element is a block element?

Answer: • All

Question:* Why will the following declaration not work? p { margin-right: 80 px; }

Answer: • there is a space between 80 and px

Question:* Which of the following specifies what the style actually does?

Answer: • Properties

Question:* What is the direction property in CSS?

Answer: • It specifies the text direction/writing direction.

Question:* What hyperlink property specifies whether new destination links should open in a new window or in a new tab of an existing window?

Answer: • target-new

Question:* The following is an example of which type of CSS selector? E > F

Answer: • Child selector

Question:* When determining hex colors, which value is the greatest?

Answer: • f

Question:* What is the CSS shorthand to set a borders top to 10, bottom to 5, left to 20 and right to 1 pixel?

Answer: • border: 10px 1px 5px 20px;

Question:* What is the transform: translate() method used for?

Answer: • to move elements from their current position by an offset depending on the X and Y parameters

Question:* In the following line; H1 { color:blue } What is the part within the curly braces?

Answer: • Declaration

Question:* Which one is not a correct value of clear property?

Answer: • clear:all;

Question:* What is absolute positioning?

Answer: • When an element is positioned relative to the first parent element that has a position other than static.

Question:* What is the default value of position: ?

Answer: • static

Question:* Which property allows you to increase or decrease the white space between words?

Answer: • word-spacing

Question:* Which of the following is correct for specifying the print media type?

Answer: • @media print { p.test {font-family:times,serif;font-size:10px;} }

Question:* What is the default align for <tfoot>?

Answer: • left

Question:* Which of these is not a valid generic font-family?

Answer: • handwriting

Question:* Which tags are used to fill the semantic need for text to be marked as more important or stressed?

Answer: • <em>, <strong>

Question:* Which of the following properties can be used to create multiple columns for laying out text - like in newspapers?

Answer: • column-count

Question:* What is the effect of using a negative number in a padding declaration? Example: p {padding-top: -10px;}

Answer: • Same as padding-top: 0px;

Question:* What is the cascading order (from lowest to highest priority) when there are multiple styles specified for an HTML element?

Answer: • 1) browser default, 2) external style sheet, 3) internal style sheet (in the head section), 4) inline style (inside an HTML element)

Question:* When styling links, a:active must come _____ a:hover.

Answer: • after

Question:* Which of the following is correct for the word-wrap Property?

Answer: • p.test {word-wrap:break-word;}

Question:* Which vertical-align value is not correct?

Answer: • vertical-align: text-base

Question:* What is the adjacent sibling selector?

Answer: • +

Question:* Which value of display property is NOT valid?

Answer: • display: inline-caption;

Question:* To style a link that ends in .html differently than a link that ends with another file extension you would use which code?

Answer: • a[href$='.html']{color: purple;}

Question:* How can you keep the parent element from collapsing when all elements inside are being floated?

Answer: • All of these

Question:* What is the specificity calculation for an ID in CSS?

Answer: • 100

Question:* How do you select all the first <p> elements that immediately follow a <h2> element?

Answer: • h2 + p { }

Question:* If the link to the external css is placed after the embedded css in the <head>...

Answer: • the external styles will override the embedded styles.

Question:* Which of the following declarations is incorrect?

Answer: • table { display: table-column-grouped; }

Question:* With regards to the cascade effect of CSS, when does the order of css style rules matter most?

Answer: • When the rules are equal in specificity.

Question:* Which of the following is true about this style? border-width: thin medium thick 3px;

Answer: • The left border will have a thickness of 3px.

Question:* What does the CSS speak-header property do?

Answer: • Specifies whether table headers are spoken before every cell

Question:* What is the total width for this div : div { width: 100px; margin: 5px; padding: 10px 5px 15px 5px; border: 5px solid #000; }

Answer: • 130px

Question:* Which of the following is NOT valid.

Answer: • visibility: none

Question:* Which of the following text-decoration styles is not correct?

Answer: • text-decoration: strike-through

Question:* What does the CSS cue property do?

Answer: • Specifies a sound to be played before and after the selected element

Question:* Which of the following is a required box-shadow property?

Answer: • h-shadow

Question:* What is the recommended order for styling an <a> tag?

Answer: • a:link { } , a:visited { } , a:hover { } , a:active { }

Question:* The css property border-style:dotted solid; would have the following effect:

Answer: • Would specify different borders for different sides

Question:* What page media property gives a hint for how to scale a replaced element if neither its width nor its height property is auto?

Answer: • fit

Question:* Which of the following declarations is incorrect?

Answer: • ul { list-style-type: roman; }

Question:* Which of the following is not a pseudo class?

Answer: • first

Question:* When can a semicolon be omitted?

Answer: • Inline style setting in an HTML tag

Question:* Which of the following specifies the number of times an animation should be played?

Answer: • animation-iteration-count

Question:* position: absolute means...

Answer: • That the element is positioned accordingly to the closest ancestor with a position.

Question:* Specifies a rotation in the right or clockwise direction that a user agent applies to an image

Answer: • image-orientation

Question:* What CSS value scales the background image to the largest size contained within the element?

Answer: • contain



No comments:

HTML5 Upwork (oDesk) TEST ANSWERS 2022

HTML5 Upwork (oDesk) TEST ANSWERS 2022 Question: Which of the following is the best method to detect HTML5 Canvas support in web br...

Disqus for upwork test answers