Skills Test Answers - CSS

Which property is used to specify table borders in CSS?

edge
dimension
border



What does the background-attachment property do?

It displays a link to the background.
It attaches an image to the background.
It links background as an external file.
It sets whether a background image should scroll with the content, or be fixed.



What is the cascading order (from lowest to highest priority) when there are multiple styles specified for an HTML element?

1) browser default, 2) inline style (inside an HTML element), 3) internal style sheet (in the head section), 4) external style sheet
1) internal style sheet (in the head section), 2) inline style (inside an HTML element), 3) browser default, 4) external style sheet
1) browser default, 2) external style sheet, 3) internal style sheet (in the head section), 4) inline style (inside an HTML element)
1) inline style (inside an HTML element), 2) internal style sheet (in the head section), 3) external style sheet, 4) browser default
1) external style sheet, 2) internal style sheet (in the head section), 3) inline style (inside an HTML element), 4) browser default



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

visibility: invisible
display: none
display: hide
visibility: hidden
image: hide



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

li:nth-child(3) { // do something }
li:nth-child(1n+2) { // do something }
li:nth-child(2n+1) { // do something }
li:nth-child(3n) { // do something }
none of these



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

tree
link
src
node



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

nocontent-cells
empty-cells
blank-cells
noborder-cells



What is the scale for opacity from least to most?

1 - 100
0 - 100
1 - 10
0 - 1



What is "inline" for the CSS display property?

An inline element has no line break before or after it, and it tolerates HTML elements next to it.
It displays a line between each element.
It displays the element in sequence, line by line.
It displays a line between each lines of text.



In which direction are elements floated?

All of these
Circularly
Vertically
Horizontally



What is the syntax for a customized cursor?

Selector-style {property:value}
Selector-cursor{style:value}
Selector {cursor:value}
Selector {value:cursor}
Selector{value:property}



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

True
False



Which element is a block element?

All
<div>
<ul>
<h1>
<p>



How do you add images to list items?

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



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

around it, to the right
around it, to the top
around it, to the bottom
around it, to the left



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

left top
15% 20%
10px 10px
middle
right bottom



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

text-transform: capitalize first;
text-transform: capitalize;
type-transform: capitalize;
type-style: capitalize;



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

minimum-width
margin-width
max-width
offset-width
min-width



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

border-color: black; border-style: 1px dashed
border: 1px dotted black
border-dashed: 1px #000000
dashed-border: black 1px
border: 1px dashed #000



The completion of a CSS Transition generates a corresponding

OMD Event
MOD Event
DOM Event



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

#
None of these
.
(
{



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

the no-float property
the clear property
the negative-float property



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

horizontal-align
text-align
vertical-align



What is the correct shorthand syntax for a border?

border: 1px 1px solid #777;
border: 1px solid #777;
border: 1px solid #77;
border: 1px rounded #777;



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

Spacing
Padding
Content-border
Marking



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

an element to the left side
a centered element
an element to the right of center
an element to the right side
an element to the left of center



Which properties is used to change the case of the text?

text-decoration:
text-spacing:
text-shadow:
text-transform:



What does the property font-family do?

Tells you about the relatives of fonts
Specifies the font colors
Specifies which font to use
Specifies the font size



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

@import
#import
@insert
#insert



What color does this hexadecimal code represent: #000?

black
white
gray
opaque



Selects all elements with class="intro"

=intro
#intro
<intro>
.intro



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

transformation
capitalize
all-text
text-transform



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

You cannot use class inside a <span> tag, only id.
There is none. They can be styled with the same parameters in mind.
A <div> is a child-element of <span>, while <span> can't be a child of <div>.
<span> is an inline element by default, while <div> is a block element.



Which of the following removes the bullet from an unordered list?

list-style-type: none;
list: none;
style-type: none;



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

True
False



Which of the following is an example of using group selectors?

[h1, h2, p] { color:green;}
group(h1, h2, p) { color:green;}
selector(h1, h2, p) { color:green;}
h1, h2, p { color:green;}



What is the correct method of changing text color?

{font-color:#000000;}
{color:#000000;}
{text-color:#000000;}
{text:#000000;}



To set the bottom border width...

border-bottom-width:15px;
border/bottom-width:15px;
border-bottom"width":15px;
border--width:15px;



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

external styles
internal styles
inline styles
exceptional styles



Which states whether the text is underlined or not?

text-transform:
text-spacing:
text-decoration:
text-shadow:



How to apply the text-shadow around the text?

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



Which of the following always refers to text color?

color
text-color`
hue
font-color



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

All are correct
medium
thin
thick



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

top: 0px, right: 6px, bottom: 3px, left: 6px
top: 6px, right: 3px, bottom: 0px, left: 3px,
top: 6px, right: browser default, bottom: 0px, left: 3px
top: 6px, right: 0px, bottom: 0px, left: 3px
top: 0px, right: 6px, bottom: 0px, left: 3px



What does the float property do?

Aligns HTML elements to the right or left while allowing content to flow around it
Allows web designers to overlap elements or to stack them on top of each other
Allows users to drag and drop images to another location on the page



Which of the following is correct to transform text to lowercase?

p {text:lower;}
p {text-transform:lower;}
p {text-transform:lowercase;}
p {text-case:lower;}
p {text-style:lower;}



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

background-x-y
background-repeat+image
repeat
background-repeat
repeat,background



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

#img { border: none; }
img { border: noborder; }
#img { noborder; }
img { border: none; }
img { noborder; }



What property changes the text color of an element?

color
foreground-color
text-color
fore-color



Which is the correct syntax for centering the text in the header?

h1 {text-align: center;}
p {text-align: center}
h1 {font-align: centered;}
h1 {text-align: centered;}



What css selector Insert content before every <p> element

p:before
p<before>
before=p
P`before



How do you designate an inline style?

src = " "
inline = " "
href = " "
css = " "
style = " "



Which of these is not a vendor prefix?

-webkit-
They are all vendor prefixes.
-o-
-ms-
-moz-



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

.id_name { }
#id_name { }
/* idname { } */
if id=id_name then { }



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

False
True



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

m-heights
min-height
min: height
minimum-height



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

a:visited
a:link
a:hover



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?

Liquid
Responsive
Fluid
Elastic



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

body {color: black}
{body:color=black(body}
body:color=black
{body;color:black}



Colors in CSS can be specified by the following methods:

Hexadecimal colors
RGB colors
HSLA colors
All of these
HSL colors



Which CSS property controls the text size?

text-style
font-style
text-size
font-size



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

blue-space
green-space
red-space
white-space



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

"#"
"d"
"."
:."
"{ }"



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

Grayscale
CMYK
Indexed
RGB



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

master:center
master -align:center;}
.center {text-:master;}
.master {text-align:center;}
#master{text-align:center;}



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

Only for <P> tags
Yes
No
Only for images



How do you add a background color?

div {bgcolor = red}
div {bgcolor : red}
div {background-color = red}
div {background-color : red}



Which syntax displays hyperlinks with an underline?

a {text-decoration: u}
a {text-decoration: underline}
a {font: decoration: none}
a: font-decoration: underline



Which is the correct syntax of the background color for links?

a:link {background-color:@B2FF99;}
a:link {background-color:#B2FF99;}
a:link {background-color:!B2FF99;}
a:link {background-color:%B2FF99;}



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

the class Selector
an html tag
the ID Selector



When does aligning a block element have no effect?

when it's width is set to 50%
when it's width is set to 100%



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

$
id=""
#
.
@



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

h1 { background-color: #FFFFFF; }
h1 { bg-color: #FFFFFF; }
h1.all { background-color: #FFFFFF; }
h1:all-childs { background-color: #FFFFFF; }



What does CSS stand for?

Creative Style Sheets
Cascaded Style Sheets
Cascading System Sheets
Cascading Style Sheets



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

rgb(255,255,255)
white
All of the above
#ffffff
#fff



Which tag is used to link External Style Sheets?

<link>
<external>
<ess>
<sheet>



Which is the correct CSS syntax?

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



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

.styles
.style
.main
.css



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

"#"
"%"
"@"
"_"



Pseudo-elements can be combined with CSS classes.

False
True



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

padding
align
spacing



Which of the following CSS declarations would change the border style?

border-style: solid;
border-weight: solid;
borderstyle solid;
border-width: solid;



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

y-index
x-index
a-b testing
z-index



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

In the <head> section
In the <body> section
At the top of the document
At the end of the document



Is :focus a pseudo-class?

Yes
No



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

Links will be styled with no underlines
Paragraphs will have hidden text
It's an anchor with no ship
It is invalid



How do you make the text bold?

font:b
font-weight:bold
style:bold



What does the border-radius property do?

Controls the spacing in a table
Creates square corners
Creates colorful corners
Creates rounded corners



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

No
Yes



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

the height and width of an element
the importance order of the cascade
the depth of nested divs
2d and 3d dimensions



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

background-img
background-image
image-bg
imagesbackground
bgimage



A class is prefaced by what symbol?

</
@
< 
#
.



Which is the correct CSS syntax?

body:color=black
body {color: black}
{body;color:black}
body (color: black)
{body:color=black(body}



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

At the top of the document
Between the <style> tags
At the end of the document
In the <head> section
In the <body> section



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

a:link
mouse over
a:over
a:hover



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

)
]
None of these
> 
}



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

h1.all { background-color: #FFF;}
h1 { background-color: #FFF; }
all:h1 { background-color: #FFF; }
all.h1 { background-color: #FFF; }
h1:all { background-color: #FFF; }



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

all.h1 {background-color:#FFFFFF;}
h1.all {background-color:#FFFFFF;}
h1 {background-color:#FFFFFF;}



Which CSS property controls the text size?

size-font
font-style
text-size
text-style
font-size



The outline property is used to control:

all of these
color of outline
width of outline
style of outline



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

x-spacing
hsize
size
width
min-width



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

color
color-space
color-spacing



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

/*This is a comment*/
</ This is a comment />
#This is a comment#
//This is a comment



Which is the correct CSS syntax?

selector { property, value }
selector /property=value
selector ( property:value )
selector { property: value; }
selector, property=value



The class selector is used to specify a style for:

the <p > tag
a group of elements
the <head> tag
the <a> tag



Which of these is the correct way to specify color?

h2 {color:rgb(255,0,0);}
body {color:blue;}
h1 {color:#00ff00;}
All of these



What does the background-color property do?

Specifies the background color of an element
Specifies the background image
Returns "true" if the background color matches another element
Copies the background color from another element



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

Zapfino
Georgia
Arial
Times New Roman
Verdana



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

In the <footer>
In the HTTP headers
In the <head>
In the <body>



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

<link to ="stylesheet" type="text/css" href="main.css">
<text/css" href="main.css">
<link rel="stylesheet" type="text/css" href="main.css">
<link/"stylesheet" type="text/css" href="main.css">



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

border-display
border-style
border-kind
border-design



What property alters an elements background color?

color
bgcolor
background-color



Who maintains CSS?

Microsoft
W3C
Mozilla
Google
Apple



Which is the correct CSS syntax?

body { color: red; }
body:color=black
{ body; color: black }
body { color; red }
{ body: color=black(body }



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

border
margins
padding
All are correct



CSS stands for

Common Style for Strings
Community Specification of Styles
Cascading Style Sheets
Common Style Sheets
Cascading Style for Strings



What css selector selects all elements?

!
^
*
~



Which tag is used to define an Internal Style Sheet?

<style>
<iss>
<internal>
<script>



What are the possible values of the property background-attachment?

Both scroll and fixed
scroll
fixed



Dimension properties allow you to control:

the text size in an element
the color of an element
the height and width of an element



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

kerning
tracking
letter-spacing



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

a:hover
a:unvisited
a:visited
a:active
a:link



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

In the <title> section
In the <body> section
At the end of the document
In the <head> section



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

To call an external stylesheet
It does nothing
To request a sandwich
To call an internal stylesheet



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

<link rel="stylesheet" type="text/css" href="mystyle.css">
<style src="mystyle.css">
<stylesheet>mystyle.css</stylesheet>



When does the link state a:hover occur?

When the user mouses over it
When the user clicks it
When the user has visited it
It is a normal link



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

border-radius
rounded-corners
border-curve



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

Associations
transistor
Transitions



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

foont
styles-font
font-style
foont-styles
font-decoration



What is the extension for an external style sheet?

.sass
.theme
.css
.styles
.style



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

<script>
<css>
<style>



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

{p = margin-left:20px}
{p: margin-left:(20px)}
{p: margin-left:20px;}
p {margin-left:20px;}



Which property is used to change the background color?

backgroundcolor:
bgcolor:
color-background:
color-bkgd:
background-color:



An ID is prefaced by what symbol?

#
@
</
.
< 



Which HTML attribute is used to define inline styles?

styles
class
font
style
instyles



The CSS list properties allow you to:

All are correct
Set different list item markers for unordered lists
Set different list item markers for ordered lists
Set an image as the list item marker



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

word-spacing
background properties
All of these
vertical-align
font properties



The default value of the font-variant property is

different
large-caps
small-caps
normal



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

At the beginning of the document
In the <head> section
In the <body> section
At the end of the document



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

<style src="mystyle.css" />
<link rel="stylesheet" type="text/css" href="mystyle.css">
<stylesheet>mystyle.css</stylesheet />



What does CSS stand for?

Cascading Style Sheets
Creative Style Sheets
Colorful Style Sheets
Computer Style Sheets



What does CSS define in HTML?

How to made HTML elements
How to save HTML elements
How to send HTML elements
How to display HTML elements



What does the scale() method do?

It rotates the element
It adds color to the element
It increases or decreases the size of element



What is the difference between ID and Class?

You can use multiple classes on the same element, but you can't do that with ID's
You can use multiple ID's on the same element, but you can't do that with classes
Classes have browser default values, ID's don't
ID's have browser default values, classes don't



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

text-transform
text-smaller
text-styles
text-capital



Which value is used to define a dashed border?

dashed
dotted
dashing



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

maximum-height
max: height
m-height
max-height



Which of the following will set the entire page background color?

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



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

z-index
x-index
y-index



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

Inline CSS
Don't use CSS, use Google
External CSS
Internal CSS



What does background-origin property do?

It specifies the background text.
It specifies the positioning area of the background images.
It specifies the background color.



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

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



Which of the following pseudo-elements are invalid?

:before
::first-letter
;last-paragraph
::first-line
:after



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)" />

This image will be partially clipped.
This image will be partially transparent.
This image will be completely hidden.
This image will fade in slowly over time.



Which symbol is used to define an ID?

! (exclamation point)
# (pound sign)
$ (dollar sign)
% (percent sign)
@ (the "at" symbol)



What should CSS be used for?

structure
scripting
styling
just themes



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

100%
auto
default
random



Which of the following is true for setting font type?

p { font-type:"Times New Roman",Georgia,Serif; }
p { font:"Times New Roman",Georgia,Serif; }
p ( font:"Times New Roman",Georgia,Serif; )
p { font-style:"Times New Roman",Georgia,Serif; }
p { font-family:"Times New Roman",Georgia,Serif; }



The background color can be specified by:

a color name, e.g., yellow
a HEX, e.g., #00ff00
an RGB value, e.g., rgb(255,0,255)
All of these



The <link> tag goes inside

title section
The head section
body section



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

font-format
font-style
font-weight
font-appearance
font-intensity



.css files may be created using what software?

All of these, any text editor will do.
Smultron
BBEdit
Text Mate



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

font {Verdana;}
page {font-family: Verdana;}
body {font-family: Verdana;}
body {font-type: Verdana;}



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

<stylesheet>mystyle.css</stylesheet />
<link rel="stylesheet" type="text/css" href="mystyle.css">
<style src="mystyle.css" />



What does CSS stand for?

Common Style Syntax
Creative Style Sheet
Computer Style Sheets
Cascading Style Sheets



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

!
%
#
&



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

list-main
list-all
list-style
list-css



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

hexadecimal
pentadecimal
nanodecimal
octadecimal



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

10px
0
40px
30px
20px



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

em
pt
px
All of these



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

Smart CSS
Internal CSS
External CSS
Inline CSS



Internet Explorer supports the fixed value only if...

header is specified.
!DOCTYPE is specified.
!DOCTYPE is not specified.



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

<style>
<link>
<script>
<css>



Which property specifies the spacing between lines?

textHeight
line-x
line-height
height
lineHeight



How do you display hyperlinks without an underline?

a {text-decoration:none}
a {text-decoration:no underline}
a {decoration:no underline}
a {decoration: no-underline}
a {underline:none}



How can you assign a higher specificity to a property value?

body:important { background: blue; }
body { background: blue !important; }
body { /* background: blue; */ }
no-override: body { background: blue; }



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

h1 {text-transform:uppercase;}
h1 {text-style:uppercase;}
h1 {text:uppercase;}
h1 {text-transform:upper;}



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

Inline styles.
All of these
Embedded stylesheets.
Externally linked stylesheets.



How can you add a comment to a stylesheet?

Enclose comment between opening and closing comment markers as follows: /* and */
Enclose comment between opening and closing comment markers as follows: # and #
Enclose comment between opening and closing comment markers as follows: <? and ?>
Enclose comment between opening and closing comment markers as follows: <!-- and -->



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

border-decoration
border-layout
border-weight
border-style



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

h1 h2 h3 { font-family: sans-serif; }
h* { font-family: sans-serif; }
None of these
h1, h2, h3 { font-family: sans-serif; }



Which of the following is NOT a CSS font property?

font-family
font
font-style
font-size
font-invariant



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

margin: 0;
margin; 0;
margin: 0 0 0 0 px;
margin-all: 0;



What can CSS selectors look for?

certain objects inside of other certain objects
certain classes and ids
all of these
certain HTML tags
hovered or clicked objects



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

starts with " and ends with "
starts with { and ends with }
starts with ( and ends with )
starts with # and ends with .



On which side will there be a 20px padding given the following declaration: padding: 30px 15px 20px 10px;

bottom
left
top
right



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

border-decoration
border-weight
border-layout
border-style



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

background tile
background-repeat
backround-y
background-x



Negative values for transition-duration are treated as

0
2
3
1



Which are the two main parts of a CSS rule?

Selector and Declaration
Only Selector
Selector and Example
Design and Definition



What is a CSS rule?

Statements that tell the users computer where to go and what to do.
Main markup language for creating web pages and other information.
Statements that tell the server what to do.
Statements that tell the web browser how to render certain element or elements on the page.
HyperText Markup Language



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

.myclass {width: 480px; height: 640px;}
myclass {width: 640px; height: 480px;}
class.myclass {width: 640px; height: 480px;}
.myclass {width: 640px; height: 480px;}
myclass.class {width: 640px; height: 480px;}



In reality layers are often used in more dynamic ways:

Menus that pop out when triggered
All are correct
Games where you move an object around
Flying elements/banners on the page



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>

If the link in the example has been visited, it will not be displayed
The link in the example will turn red on mouseover
The link in the example will always be red
If the link in the example has been visited, it will be displayed in red



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

#box {invisible:true}
#box {visibility:invisible}
box {visibility: visible}
#box {visibility:hidden}



Can web fonts be imported with .css files directly

Web fonts can only be imported using the <link> tag
No, web fonts can't be imported
Yes, by using @import url("fontname");



Which styles of border can be look in dotted?

border-style: outset;
border-style: solid;
border-style: dashed;
border-style: dotted;



Which of the following css declarations will create bold text?

{text-weight: bold;}
{text: bold;}
{font: bold;}
{font-weight: bold;}



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

Dreamweaver, GoLive or FrontPage
Save as .css extension, Save as .css3 extension, Save as .style extension
Inline, embedded or document level and external
Handcoded, Generated or WYSIWYG



Which is the correct syntax of css border?

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



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

text-decoration:overline
text-decoration:none
text-decoration:line-through
text-decoration:underline



What css selector selects the document’s root element

:root
:root-level
:main-root
:root-file



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

padding
Spacing
Marking
Content-border



Which attribute creates space between content and its container?

stuffing
float
padding
clear
margin



__________ property is mostly used to remove underlines from links:

text-decoration
text-transformation
text-trans



What is the difference between margin and padding?

There is no difference they both do the same thing.
Margin is on the outside of block elements while padding is on the inside.
Padding is on the outside of block elements while margin is on the inside.
Margin is for absolute positioning and padding is for fixed positioning.
Margin is for creating space between text and padding is for making sure elements do not collide.



The CSS3 property for transparency is...

transparency %
see-through %
transparency
opacity



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

<sheet>
<src>
<link>



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

False
True



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

paragraph {font-family: "lucida sans unicode", sans-serif;}
a:link {font-family: "lucida sans unicode", sans-serif;}
body: font-family: "lucida sans unicode", sans-serif
a:link {font-family: "times new roman", serif;}



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

@media
@import
@type
@screen



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

list-type: square
type: square
list-style-type: square



Which is the correct CSS syntax?

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



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

float: middle;
horizontal-align: middle;
margin: 0 auto;
left-to-right: center;



What selector is used to select all elements?

body
head
p
*
div



How can you create responsive websites through css?

Referencing multiple external stylesheets with different type attributes for device MIME types.
Use an @media query.
None of these.



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?

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



Which contemporary web browser(s) support CSS?

Internet Explorer
All of these
Chrome
Firefox



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

50px
30px
20px
10px



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

It will take up the maximum possible space.
It will not take up any space.
It will take up the minimum possible space.



Which of these has the highest priority?

browser default value
external style sheet
inline style



The text-decoration are:

text-decoration:line-through
All are correct
text-decoration:underline
text-decoration:overline



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

style import="other.css";
import href="other.css";
@import url("other.css");
link import="other.css";



Which of these examples of using the clear property are correct?

.text_line { clear:all; }
.text_line { clear:both; }
.text_line.clear;



Which property increments or decrements the space between characters?

direction
white-space
letter-spacing



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

text-color:
color:
font-color:



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.

list-style-type
list-type
list-style-layout
list-type-style



Which of the following selects the active link?

active
all=active
#:active
:active



What does the pseudo class last-child do?

targets the last element on the style sheet
selects the last element in a targeted parent element.
selects the last element on the page



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

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



Which of the following sets the stack order of a positioned element?

ar-index
All of these
s-index
z-index



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

left
right
top
bottom



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

image-origin
bg-origin
mailorigin
background-origin



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

<style type="text/css"> a:hov {color:#000000} </style>
<style type="text/css"> a:hover {color:#000000} </style>
<style type="text/css"> a->hover {color:#000000} </style>
<style type='text/css'> hover:a {color:#000000} </style>



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

p { font: bold; }
p { font-weight: 400; }
p { font-weight: bold; }
p { font-weight: strong; }
<p style="text-size: strong">



With what characters are multiple fonts separated with?

periods
brackets
commas
dashes



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

forms and fields
shipping and receiving
design and layout
html



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

ls-style
liststyle
list-style
None



Which Represents a line that acts as a boundary?

Padding
Border
Margin



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

border
border-css
border-main
border-all
border-style



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

True
False



What do the Greater Than sign > indicate in CSS

Selects the last element
Selects the previous element
Select the child of the element it follows
Selects the next element



CSS comments are inserted inside .

/*..................*/
<!..................>
All of them
//...................//



By which of the following is a declaration terminated?

//
::
;
!



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

position
direction
location



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

opacity: 30%
opacity: 70%
opacity: 0.3
opacity: 0.7



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

% sign
# sign
$ sign
@ sign



Which of the syntax is correct?

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



How would you hide an element using the display property?

display: block;
display: none;
display: hidden;
display: 0;
display: invisible;



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

a:active {color:#445566;}
a:active {text-color:#445566;}
a {color:#445566;}
a {active-color: #445566;}



How do you remove browser default margin and padding settings?

Set margin and padding to 0
Set margin and padding to auto
Set margin and padding to custom
Set margin and padding to css



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

h1 {font-size: 18px; font-weight: bold; text-decoration: underline;}
#h1 {font-size: 16px} {font-weight: bold} {text-decoration: underline}
h1 {font-size: 16px; font-weight: bold; text: underline;}
h1 {font-size: 16px; font-weight: bold; text-decoration: underline;}



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

transform
2d-transform
d-transform
3d-transform



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

input[type=submit] { }
input:type.submit { }
input::submit { }
input-submit { }



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

margin
spacer
none of these
padding



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

Top: 5px, right: 10px, bottom: 5px, left: 10px
Bottom: 10px, right: 10px: top: 5px, left: 5px
Top: 10px, left: 10px, bottom: 5px, right:5px
Top: 10px, right: 5px, bottom:10px, left:5px
Top: 10px, right: 10px, bottom: 5px, left: 5px



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

Add "display: hide" to your style sheet rule.
Add "display: none" to your style sheet rule.
Add "visibility: invisible" to your style sheet rule.
Add "visibility: hidden" to your style sheet rule.
Add "image: hide" to your style sheet rule.



Which is the correct syntax of the CSS?

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



What are the two components of every CSS style definition?

selection, properties
selector, properties
section, id
copy, properties



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

#hover
.hover
:hover
hover



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

False
True



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

Side Element
Box Element
Square Element
Block element



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

a:hover { background-color: #FF704D; }
a:link { background-color: #FF704D; }
a:active { background-color: #FF704D; }
a:hover { color: #FF704D; }



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

<css>
<script>
<style>
<embed>



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

head
type
rel
href



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

list-style-type: none
list-style-type: no
list-style-type: nobullets
list-type: none



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

opacity: 2.0;
opacity: 1;
opacity: 0;
opacity: 0.5;



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

#content p
#content [p]
#content <p>
#content < p
#content 'p'



is the correct pseudo-class for modifying only the first element of a selector?

:first-child
:1st
:first-element
:first-of-type



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

border-width: 3px;
border-size: 3px;
border-style: 3px;
border width: 3;



What does the child selector (">") do?

Matches elements that are a direct child of the parent match
None of these
Matches all descendants (recursively)
Matches any element



The correct example of class selector is .

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



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?

show: force
scrollbar: on
v-scrollbar: auto
overflow: auto
h-scrollbar: scroll



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

frame model
table model
box model



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

color
blue
color: blue
h1
{ }



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

margins to 50%
margins to center
margins to auto
margins to none



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

spacer
padding
None of these
margin



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

p:last-child-parent
p:last-parent-child
p:last-children
p:last-child



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

Total element width = width + left padding + right padding + left border + right border + left margin + right margin
Total element width = width + right padding + right border + right margin
Total element width = width + left padding + left border + left margin



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

To vertically align an image: img { vertical-align:text-top; }
It sets the vertical alignment of an the entire webpage.
It sets the vertical alignment of an element.



What css selector selects the input element which has focus?

a:focus
input:focus
input+focus
a:input



Which of the following has the highest priority?

Internal style sheet (in the head section)
Browser default
Inline style (inside an HTML element)
External style sheet



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

'b'
'c'
'a'
'd'



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

paragraph { border-width:5 solid red; }
p { border:5px; solid; red; }
paragraph { border:5px solid red; }
p { border-style:5px solid red; }
p { border:5px solid red; }



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

p { color:red important; }
p { color:red force; }
All of these
p { color:red !important; }



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

Border
Content
Padding
Margin



The id selector is used to specify a style for

single, common element
single, unique element
multiple,unique element
multiple,common element



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

Opacity (Alpha channel)
Grey
This is incorrect syntax and will do nothing
Black



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

None of these
table
red
color



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

Padding appears red
Table background is red
Text within it is red
Border around the table is red



Multiple font faces are separated by __________

Comma
Slash
Semicolon
Dot



How do you apply multiple classes to an element?

<div class="class1,class2" ></div>
<div class="class1 class2" ></div>
<div class="class1" class="class2" ></div>
<div class="[class1][class2]" ></div>
This isn't possible in CSS.



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

Aligns text to the center of the nearest image as a caption
Aligns text in horizontal center of the containing element
Aligns text in vertical center of the page
Aligns text in the center and places it at the top of the page



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

ul-style
list-style
listStyle
ol-style
Both ol-style and ul-style depending on the list type.



What is the child selector in css?

+
#
.
~
> 



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

pt
huge
%
em
px



Which is the correct CSS syntax?

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



With what characters are CSS declarations separated?

semicolon ( ; )
hash ( # )
space ( )
colon ( : )
period ( . )



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

border-spacing
border-collapse
border
border-separation



The possible values of white-space are

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



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?

<dd></dd>
<do></do>
<dt></dt>
<dl></dl>



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

to the bottom
to the right
to the left
to the center
to the top



Which of the following is true about border styles?

Borders must be the same color on all 4 sides
Borders must be on all 4 sides
Borders must be equal weights on all 4 sides
None of these



When using z-index which other property is required?

overflow
position
float
background
list-style



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

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



Which of the following is the correct syntax in CSS?

rules {Property: Value : Type;}
Selector {Value: Property;}
style {Property: Value;}
Selector-declarations {Value: Property;}
Selector {Property: Value;}



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

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



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

None of these
table
color
blue



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

#content a {underline:none;}
a {underline:none;}
a#content {text-decoration:none;}
a {content text-decoration:underline;}



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

Use the HTML <link /> tag, like this: <link rel='stylesheet' type='text/css' href='styles.css' /> .
Use the HTML <link /> tag, like this: <link rel='style' type='text/css' href='styles.css' /> .
You can use '@import' sentence.



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

:no-p
:all-but-p
:not(p)
:notp



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

a[href="smarterer.com"] { color: #ff0000; }
a[href="http://www.smarterer.com"] { color: blue; }
a[link="http://www.smarterer.com"] { color: #0000ff; }
a[link="http://www.smarterer.com"] { color: blue; }



Where is the margin property located in the CSS box model?

Outside the box
It could be inside or outside the box, depending on where you place it in your code
Inside the box



What does minifying CSS do?

compiles it completely
compresses the code by removing whitespace, which is not needed
combines it with HTML code to integrate it and make it faster
gzips the file



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

h2 heading inside element div of id wrapper
h2 heading inside element div of any class
None of these
h2 heading inside element div of class wrapper



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

div;;p
div:;p
div:p
div,p



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

font-style
background-position
text-indent
color



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

text-transform
text-format-indentation
text-indent
text-decorate



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

Inline
External
Internal



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

Top margin will be 10px and other margins will be 2% of the total width
Left and right margin will be 10px and top and bottom margin will be 2% of the total height
Left margin will be 10px and other margins will be 2% of the total width
Top and bottom margin will be 10px and left and right margin will be 2% of the total width.



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?

CSS Image Group
CSS Image Mix
CSS Image Sprites
CSS Image Code



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

#example input.submit
#example input[type="submit"]
.example input[type="submit"]
.example input[type:submit]
#example input[type:submit]



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

th:nth-child(odd)
tr:nth-child(odd)
col:nth-child(odd)
td:nth-child(odd)



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

position: relative;
position: fixed;
all of the answers
position: absolute;



By default, the background-image property repeats an image...

both horizontally and vertically
vertically
horizontally
no-repeat



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

Contextual selector
Id selector
Class Selector
Pseudo-class selector



What is true about image sprites?

Both of these
Using image sprites will reduce the number of server requests.
It is a collection of images put into a single image.



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

{overflow:always}
{overflow:auto}
{scroll:on}
{overflow:on}
{overflow:scroll}



What is an image sprite?

It is a collection of images put into a single image.
It specifies a link to an image.
It is a style of an image in different page of the website.
It is a way to open one image at a time within the html.
It specifies the image style.



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

top, bottom
left, right
top & left, right & bottom
top & bottom, left & right



Which of the following selects all unvisited links?

"link"
link
+link
:link



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

display: none;
visibile: zero;
show: hidden;
visibility: none;
visibility: hidden;



Which two properties are the defaults when positioning a layer?

top, left
bottom, left
bottom, right
top, right



Which declaration removes bullets from a navigation list?

list-bullets:none
list-style-type:no bullets
list-style-type:none
list-style-none



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

#home:enabled
#home:indeterminate
#home:hash
#home:target



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

white-space
direction
none
letter-spacing



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

Fixes the element on its parent element
Fixes the element relative to the browser's viewport
Fixes the element on its child element



An outline is always placed __________ of the box

Outline
backline
Inline



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

Element with z-index of 6
Element with z-index of 9
Element with z-index of 2
Element with z-index of 1



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

selector.pseudo-class { ... }
selector:pseudo-class { ... }
selector->pseudo-class { ... }
pseudo-class { ... }



Which values can be used to set text direction?

ltr and rtl
mltr and mrtl
ttr and btr
None



What CSS selector selects all elements with a target attribute?

/target/
`target
{target}
[target]



What are the three methods for implementing a stylesheet?

Direct call, Indirect call, and Embedded
Inline, Embedded, and External
Internal, Embedded, and External
Linked, Appended, and Embedded



The transition-duration property is in fact the only property required

to create a transition effect
All are correct
all properties that are able to undergo a transition
as if transition-property is not supplied



Which operator is used for pseudo classes?

> (greater than)
:: (double colon)
: (colon)
[space]
< (less than)



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

transition-duration
transition
transition-property
transition-delay



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

A list inside of a table inside of something named content
A link with an id of "content"
Links inside of a list inside of a table inside of an element with an id of 'content'
Text inside of a list inside of a table inside of something named content



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?

justify
Both justify and center
center



Which property specifies spacing behavior between text characters?

font-spacing
text-letter-spacing
text-transform
letter-spacing



___________ properties provide several options to place the content on the web page.

Margin
Location
Positioning



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

inherit
side
bottom
top



The_________ means unvisited hyperlinks.

:visited
:hover
:active
:link



In the CSS box model, where is the margin located?

Immediately outside the box border
None of these
Between the padding and the box border
Immediately within the box border



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

cursor: finger;
cursor: cursor;
cursor: hover;
cursor: pointer;
cursor: hand;



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

.one { property: value; } .two { property: value; } .three { property: value; }
.one, .two, .three { property: value; }
.one .two .three { property: value; }
.one / .two / .three { property: value; }



Why will the following declaration not work? p { margin-right: 80 px; }

a right margin can only be 50 pixels or less
It should be right-margin
the P does not have a #
there is a space between 80 and px



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

capitalize
none
lowercase
uppercase



What hyperlink property is typically used to specify whether destination links should open in a new window or in a new tab of an existing window?

target="fresh"
target="_blank"
target="open-window"
target="open-new"



What is the direction property in CSS?

It specifies the orientation an image.
It specifies the text direction/writing direction.
It specifies the orientation of the webpage.
It specifies the orientation an ordered list.



What does the list-style-position property do?

It specifies the color of a list item in a fixed position.
It specifies the font style of a list item.
It specifies if the list-item markers should appear inside or outside the content flow.
It specifies the orientation of a list.



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

both
neither
horizontal
vertical



Is a # required before colors in CSS?

No, unless you are using more than ten colors
No, only when specifying colors as hexadecimal values.
Yes, always
No, it is optional



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

border-style
p
outset



Which of the following specifies the type of list-item marker?

list-style-all
list-marker
list-style-type
list-style-marker



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?

div {margin: 5px 0 10px 2px;}
div {margin: 5px 2px 0 10px;}
div {margin: 10px 2px 5px 0;}
div {margin: 10px 5px 2px 0;}



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

:nth-child(second)
:nth-child(even)
:nth-child(everysecond)
:nth-child(odd)



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

not take up any space. The element will be hidden, and the page will be displayed as the element is NOT there
still take up space. The element will be hidden, and the page will be displayed as if the element is STILL there
still take up space. The element will be hidden, and the page will be displayed as if the element is NOT there
not take up any space. The element will be hidden, and the page will be displayed as if the element is STILL there



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?

absolute
relative
fixed
static
inherit



Which of the following is true for the max-width property?

Set the maximum width of a paragraph with the following: p { max-width:full; }
The max-width sets the width of the table border to another border.
The max-width property does not include padding, borders, or margins.



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

Triangular Brackets
Quotation Mark
Round Brackets
Curly Braces



When determining hexadecimal colors, which value is the highest?

zz
ff
00
99



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

At the bottom of the child element
Wherever it appears inline in the document
At the bottom of the browser window
At the bottom of the <div> element



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

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



Which of the following is true about inline styles?

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



What does the * stand for in CSS?

Master Selector
Major Selector
Universal Selector
Class Selector
Attribute Selector



In the following declaration which part represents the property? table { color: blue; }

color
{ color: blue; }
table
blue



What is the transform: translate() method used for?

the text is translated to the language given as parameter in the method
to move elements from their current position by an offset depending on the X and Y parameters
To use non-euclidean geometry
to translate the text into English



What is the effect of the following css rule? [title]{color:blue;}

The titlebar of the browser will be blue
All elements other than a title attribute will be blue
All elements with a title attribute will be blue
Nothing



The First step of transition is

transition-property
transition-delay
transition-duration
transition-timing-function



The possible values of white-space are

pre
post
All are correct
normal(default value)



Which of the following css declarations will create italicized text?

{text-decoration: italic;}
{text-style: italic;}
{font-weight: italic;}
{font-style: italic;}



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

<div class="foo"> ... </div>
<div class="foo-bar foo-baz"> ... </div>
<div class="foo-bar"> ... </div>
All of these elements will be matched.



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

<div class="baz-foo"> ... </div>
All of these elements will be matched.
<div class="foo"> ... </div>
<div class="foobar"> ... </div>



Which of the correct syntax css cursor code?

p { cursor: reply } h4 { cursor: request } h5 { cursor: crosshair }
p { cursor: wait } h4 { cursor: help } h5 { cursor: crosshair }
p { cursor: wt } h4 { cursor: hp } h5 { cursor: crshair }
p { cursor: late } h4 { cursor: help } h5 { cursor: circlehair }



Select the correct value to set the background to silver for even rows.

tr:nth-child(2n) {background: silver;}
tr:nth-child(1) {background: silver;}
tr:even {background: silver;}
tr:nth-child(2) {background: silver;}



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.

i-False, ii-True
i-True, ii-True
i-False, ii-False
i-True, ii-False



Which of the following tells the browser where you want to apply the rule?

Main
Property
Selector
Body
Value



The following is an example of which type of CSS selector? E > F

Parent selector
Adjacent selector
Sibling selector
Child selector



Identify the value in the following rule: a:hover { text-decoration: none; }

text-decoration: none;
a
a:hover
text-decoration
none



What does the following declaration accomplish? div{background-color: rgba(255,255,255,0.8); }

It sets a black background with a transparency of 80% to the div element.
It sets a light gray background with a transparency of 80% to the div element and its children.
Nothing: this declaration is not supported in Webkit browsers.
It sets a white background with a transparency of 80% to the div element.
It sets a dark gray background to the div element.



What are the correct values for "float" property?

left, right, top, bottom
left, right
left, right, all
left, right, none



how to set multiple images in background through css

background-image: url(xyz.png) url(a2z.png);
background-image: url(xyz.png); background-image:url(a2z.png);
background-image: url(xyz.png), url(a2z.png);
background:image= url(a2z.png), url(xyz.png);
background-image= url(xyz.png) > url(a2z.png);



Which would you use to write shorthand css to affect the outline properties?

outline-total
outline-all
outline
all of these



Which of the following color values is invalid?

transparent
#abcdef
#f00
They're all valid.
rgb(1, 2, 3)



The box model consists of which of the following:

HTML, CSS, and Javascript
width, height, border, and length
div and table
margins,borders, padding, and the actual content
display, visibility, position, and z-index



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

nocontent-cells
blank-cells
noborder-cells
empty-cells



What CSS selector selects all elements with a target attribute?

[target=_blank]
[target_blank]
[target]
[blank]



The elements after the floating element will...

not be affected
be deleted
flow around it
clear
move a way from it



What is the purpose of line-height?

Set the height for each line of text in an html element.
To vertical align text in an html element.
All of these.
Set the height of the html hr tag.



What is NOT an advantage of using CSS files?

The ability to change the look of a whole site by changing a single file.
Less-cluttered HTML code, making it easier to read and maintain.
Ability to hide the CSS code from the user.
Separation of style and content.



Which of the following specifies what the style actually does?

Properties
Selector
Id
Class



What is the CSS shorthand to set a borders top to 10, bottom to 5, left to 20 and right to 1 pixel?

border: 10px 20px 5px 1px;
border: 10px 1px 5px 20px;
border: 5px 20px 10px 1px;
border: 10px 5px 20px 1px;



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?

padding:10px 25px 7px 2px
padding: 25px 10px 7px 2px
padding <10px 25px 7px 2px>
padding: 10px 7px 25px 2px



Which of the following best describes the effect that a floated element has on surrounding elements?

If an image is floated to the right, a following text flows around it, to the right:
The elements after the floating element will flow around it.
The elements before the floating element will be affected.



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

stantaneous
simultaneous
instantaneous



What does the following selector do: element[foo]

Matches any element without a foo attribute.
Matches only elements without the foo attribute set.
Matches only one element with the foo attribute set.
Matches any element with the foo attribute set.



What does "Cascading" in CSS refer to?

Separates a document's content from its display rules
The way elements of a document can "cascade" by being moved on the page
The hierarchy of rules which determines how element properties are inherited
A series of independent rules to control document style



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

value
html
content
text
insert



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

CSS 1
CSS 2
CSS 3
CSS 2.1
All versions



Which of these is NOT a CSS pseudo-class?

a:hover
input:focus
p:after
a:active
a:blur



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

em
px
pt
percent



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

None of these, can't do that in CSS
a { prepend: href='https://sales.'; color: pink; }
a[href^='https://sales.'] { color: pink; }
a:before { content: attr(href) "https://sales."; color: pink; }



Where will a block level element appear in relations to the previous element in the document (by default)?

Below the previous element
Alongside the previous element
Above the previous element
On top of the previous element



The Text spacing properties are

The letter-spacing property :
The word-spacing property :
All are correct
The text-indent property :



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

border-(downwarddirection)
border-(upwarddirection)
border-(direction)
border-(location)



What character is used before the pseudo-class property?

semicolon
colon
dot
hash



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

groove
hidden
inset
ridge



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

yes, it affects HTML rendering and CSS styling
no, it's strictly for HTML



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

inline > embedded > external
inline > external > embedded
embedded > external > inline
external > inline > embedded



Which selector specifies that a list uses squares?

list-style-type: square;
type: 4 corners;
list-type-style: square;
type: square;
list-style: square;



Which list-style-type property renders a filled circle?

square
disc
circle



Pseudo-classes are used to represent _______.

Casual Events
Static Events
Dynamic Events
Related Events



Which at-rule allows you to define custom fonts?

@font-face { }
@type-family { }
@font { }
@font-family { }



Which of the following is true about the overflow property?

It fixes the content in the table, if content overflows an element's box.
It specifies what happens if content overflows an element's box.
The property values of the overflow properties include: visible, hidden, scroll, set and parent.



The Hex color #0000FF is equal to:

yellow
green
red
blue



What does the outline-offset property do?

Offsets an outline
Draws an outline beyond the border edge.
Both of the other answers are correct.



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

normal
post
nowrap
pre



Which property is used to specify typefaces ?

font-type
font-family
font-face
font-name



When styling links, a:active must come _____ a:hover.

after
before



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

border
padding
content
box model
margin



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

rule
pseudo-class
element
operator
selector



What is the border-spacing property?

It sets the distance between the borders of adjacent cells (only for the "separated borders" model).
It is the distance between 1 table to another table.
It is the distance between a table and text outside the table.
It is the distance between the text in 1 cell to the text of adjacent cells.
It is the distance between the border and text in the table.



Which property is used to specify type faces ?

font-family
font-face
font-type
font-name



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

main-bg-scroll
bg-move
background-attachment
bg
background-scroll



When using "position: absolute;" the reference point is the browser window UNLESS one of the parent elements contain one of the following...

position: inherit;
position: static;
position: relative
position: fixed;
All of these



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

target any <ul> with an ID similar to 'name-here'
target any <ul> with an ID that starts with 'name-here'
target any <ul> with an ID that contains 'name-here'
target any <ul> with an ID that ends with 'name-here'



All monospace characters have the same...

width
decoration
height
weight



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

Trident
WebKit
Gecko
Commando



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

True
False



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

Changes the background color of ONLY the second row in a table to red
Changes the background color of every even number table row to red
Changes the text color of ONLY the second row in a table to red
Changes the text color of every even number table row to red
Is invalid CSS



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

CSS textual
None
CSS text
CSS texting



Which property allows you to increase or decrease the white space between words?

word-margin
text-spacing
letter-spacing
word-spacing



What is the default align for <tfoot>?

left
right
justify
none



If an element appears before a floated element that element will...

float around it
not be affected.
float to the top
float to the bottom
float to the center



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

yellow, orange or red
white, gray or black
red, green or blue
red, purple or blue



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

position:relative
position:absolute



A user can only view the border after specifying the

color
width
All are correct
styles



Which of the following is invalid ?

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



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

color
font-weight
opacity
box-shadow
border-width



What is absolute positioning?

When an element is positioned in a natural location in a page's flow.
When an element is positioned relative to the browser window.
When an element is positioned relative to the first parent element that has a position other than static.
When an element is positioned using only z-index positioning.



What has the greatest specificity?

#footer {background: white;}
div strong {font-weight: bolder;}
*.foo tr:first-child {background: black;}
h2.foo {color: blue;}



What is the effect of using a negative number in a padding declaration? Example: p {padding-top: -10px;}

Same as padding-top: 0px;
same as padding-top: 10px;
Same as position: absolute; top: -10px;
Same as margin-top: -10px;



Which of these is not a valid generic font-family?

monospace
fantasy
serif
handwriting
sans-serif



Which vertical-align value is not correct?

vertical-align: super
vertical-align: bottom
vertical-align: text-base
vertical-align: sub



Which one is not a correct value of clear property?

clear:all;
clear:inherit;
clear:left;
clear:both;
clear:none;



Which of the following is correct for specifying the print media type?

@media-print { p.test {font-family:times,serif;font-size:10px;} }
@media-type: print { p.test {font-family:times,serif;font-size:10px;} }
@media-screen: print { p.test {font-family:times,serif;font-size:10px;} }
@media print { p.test {font-family:times,serif;font-size:10px;} }



What is the default value of position: ?

absolute
static
inherit
fixed
relative



If the link to the external css is placed after the embedded css in the <head>...

the external styles will override the embedded styles.
the embedded css will override the external styles.



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

Pseudo classes
3d translating
Property values
Attribute selectors
Property names



Which value of display property is NOT valid?

display: table-row-group;
display: inline-caption;
display: table-row;
display: list-item;
display: inline-table;



The value of letter-spacing property is

both normal or of length type
neither normal or of length type
either normal or of length type



What is the specificity calculation for an ID in CSS?

100
010
050
101
001



Which of the following is correct for the word-wrap Property?

p.test {word-wrap:wrap;}
p.test {word:wrap-text;}
p.test {word-wrap:break-text;}
p.test {word-wrap:break;}
p.test {word-wrap:break-word;}



In the following line; H1 { color:blue } What is the part within the curly braces?

Declaration
Selector
Value
Property



What is the adjacent sibling selector?

:
-
+
*
> 



What does the CSS cue property do?

Specifies a sound to be played as a background while an element's content is spoken
Prompts the user to enter a voice command
Specifies a sound to be played before and after the selected element
Specifies the frequency of the speaking voice



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

position:relative
position:absolute



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

transition duration
transition-timing-function
transition time



Which of the following is true about this style? border-width: thin medium thick 3px;

Thick borders have a thickness of 3px.
All borders are thin.
The left border will have a thickness of 3px.
The bottom border is medium thickness.



With regards to the cascade effect of CSS, when does the order of css style rules matter most?

The order only matters when using external style sheets.
When the rules are equal in specificity.
The order does not matter.
The order always matters.



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

ul
> 
a[title="home"]
li



Which CSS code is used to wrap a long unbroken text to prevent it from expanding outside the parent container?

.selector{word-wrap: break-word;}
.selector{word-wrap: break;}
.selector{word-wrap: word-wrap;}
.selector{word: word-wrap;}



How can you keep the parent element from collapsing when all elements inside are being floated?

All of these
Using a clear fix
Specify a height
Using overflow: hidden;



Which of the following selectors is the MOST efficient?

#menu .text { ... }
#menu ul li a.text { ... }
#menu ul .text { ... }
ul#menu .text { ... }
ul#menu li a.text { ... }



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

a[href^='.html']{color: purple;}
a[href&='.html']{color: purple;}
a[href$='.html']{color: purple;}
a[href*='.html']{color: purple;}



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

top or bottom
left or right
top, bottom, left or right
top, bottom, center, left or right



Which of the following is correct CSS syntax for using font property?

<p style="font: italic bold 15px;"> ....................... </p>
<p style="font: italic, bold, 15px;"> ................ </p>
<p style="font-style: italic font-weight: bold font-size: 15px;"> ................... </p>
None of these



How do you select all the first <p> elements that immediately follow a <h2> element?

h2 > p { }
h2 + p { }
h2 p { }
h2 ~ p { }



Which value preserves the white spaces as specified in the content?

pre
nowrap
post
normal



Which of the following declarations is incorrect?

table { empty-cells: hide; }
table { table-layout: fixed; }
table { border-collapse: separate; }
table { direction: rtl; }
table { display: table-column-grouped; }



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

transition-property
transition-duration
transition-delay
transition-timing-function



Which of the following is NOT valid.

visibility: collapse
visibility: visible
visibility: inherit
visibility: none
visibility: hidden



Which of the following text-decoration styles is not correct?

text-decoration: inherit
text-decoration: strike-through
text-decoration: overline
text-decoration: underline



The css property border-style:dotted solid; would have the following effect:

Specifies a double border
Is not correct
Specifies all four borders are dotted
Would specify different borders for different sides



When using the font-family property which of the following is typically NOT the last font listed?

serif
comic sans
sans-serif
monospace



What does the CSS speak-header property do?

Specifies whether the tables caption should be spoken or not
Specifies whether table headers are spoken before every cell
Specifies a sound to be played before speaking a tables content
Specifies whether the tables contents should be spoken or not
Specifies whether content will render aurally



What is the total width for this div : div { width: 100px; margin: 5px; padding: 10px 5px 15px 5px; border: 5px solid #000; }

130px
120px
110px



Which of the following properties can be used to create multiple columns for laying out text - like in newspapers?

column-rule
all of these
column-count
column-gap



What is the recommended order for styling an <a> tag?

a:link { } , a:hover { } , a:active { } , a:visited { }
a:link { } , a:active { } , a:hover { } , a:visited { }
a:link { } , a:visited { } , a:hover { } , a:active { }
a:active { } , a:link { } , a:hover { } , a:visited { }
a:active { } , a:visited { } , a:hover { } , a:link { }



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

invisible layers
enable layers
visible layers



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

marker-spacing
marker-offset
list-offset
list-spacing



Which of the following specifies the number of times an animation should be played?

animation-count
animation-iteration-count
iteration-count
iteration



Which of the following is a required box-shadow property?

color
blur
spread
h-shadow
inset



What page media property gives a hint for how to scale a replaced element if neither its width nor its height property is auto?

scale
fit
size
main



To use inline styles you use the style attribute in the ............... tag

link tag
style tag
relevant tag



Which of the following is not a pseudo class?

first
lang
active
link



Which is not a valid pseudo class?

:matches()
:only-of-type
:root
:valid
:nth



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

8
6
7
10
9



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

16,125
18,126
15,123
17,124



Which of the following declarations is incorrect?

ul { list-style-type: hiragana; }
ul { list-style-type: decimal-leading-zero; }
ul { list-style-type: roman; }
ul { list-style-type: lower-alpha; }
ul { list-style-type: circle; }



When can a semicolon be omitted?

Inline style setting in an HTML tag
Last statement in a group
All of the above.
When there is only one statement in a rule



position: absolute means...

That the element is positioned accordingly to the browser window.
That the element is positioned accordingly to the closest ancestor with an absolute position.
That the element is positioned accordingly to the closest ancestor with a relative position.
That the element is positioned accordingly to the closest ancestor with a position.



What CSS value scales the background image to the largest size contained within the element?

cover
fill
contain
repeat



Specifies a rotation in the right or clockwise direction that a user agent applies to an image

image-move
image-transform
image-orientation
image-rotation