Elance CSS Test Answers 2015 ( Part -1 )


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



 


 




 
 

No comments:

Post a Comment