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
No comments:
Post a Comment