Which property is used to specify table borders in CSS?
border
The ………………. property indicates whether a cell without any content should have a border displayed.
empty-cells
What does the list-style-position property do?
It specifies if the list-item markers should appear inside or outside the content flow.
What is the purpose of line-height?
Set the height for each line of text in an html element.
What is the order of precedence (highest to lowest) when applying styles
inline > embedded > external
Given: table { color: blue; }, which part represents the property?
color
Where will a block level element appear in relations to the previous element in the document (by default)?
Below the previous element
HTML provides a functionality to connect one or more pages in web-pages or resources.
link
Which part of the box, where the clears an area around the content?
Padding
A shorthand property for setting the four transition properties into a single property
transition
Which of the following elements will be matched by this CSS selector: div[class|=”foo”] ?
All of these elements will be matched.
Which value of the “text-transform” property transforms the first character in each word to uppercase?
capitalize
What does a ‘position: fixed;’ declaration accomplish?
Fixes the element relative to the browser’s viewport
n this CSS code, what element is the property? table {color: red;}
color
In the CSS box model, where is the margin located?
Immediately outside the box border
What property is used to specify the indentation of the first line of a text?
text-indent
What is NOT a correct value of background-position property?
middle
Of the following elements, which will be frontmost, on the top of the stack using z-index?
Element with z-index of 9
What does image sprite do in CSS?
It is a collection of images put into a single image.
What css selector selects every element that is not a <p> element?
:not(p)
Which of the following is the correct syntax for a pseudo-class?
selector:pseudo-class { … }
Which of the following is used to select one paticular tag, rather than a group of tags?
Id selector
Which property can be used to specify all the list properties into a single expression?
list-style
What are the three methods for implementing a stylesheet?
nline, Embedded, and External
The possible values of white-space are
<p style=”white-space:normal”> Use of normal white-space. </p>
In this CSS code, what element is the selector? table {color: red;}
table
Which properties is used to change the case of the text?
text-transform:
To create a layer all you need to do is assign the _______ attribute to your style
position
Which of the following properties can be used to add space outside an element’s box?
margin
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
How would you hide an element using the display property?
display: none;
What is the correct pseudo-class for modifying only the first element of a selector?
:first-child
What rule is generally used, for responsive web design, to target devices with different widths?
@media
How do you set the text color in a css rule
color:
#container {margin: 20px 30px 10px 50px} The margin-right value will be…
30px
What is one way to center a fixed-width element (relative to its container)?
margin: 0 auto;
What css selector selects the document’s root element
:root
What can CSS selectors look for?
all of these
What is the difference between margin and padding?
Margin is on the outside of block elements while padding is on the inside.
The _________ means an element that has the user’s mouse pointer hovering over it.
a:hover
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: 2px, 0px, 1px, 0px;}
Which states whether the text is underlined or not?
text-decoration:
CSS colors are defined using a _________ notation for the combination of Red, Green, and Blue color values (RGB).
hexadecimal
Which attribute creates space between content and its container?
padding
The CSS3 property for transparency is…
opacity
How would you define class ‘myclass’ that sets the width of an element to 640px and the height to 480px ?
.myclass {width: 640px; height: 480px;}
Which of the following units of measurement can be used when creating a margin?
All of these
What is CSS valid syntax for setting the margin value to 0?
margin: 0;
Which of the following defines the tiling pattern for one or more background images?
background-repeat
…………………. is used to import an external style sheet in a manner similar to the <link> element.
@import
What color does this hexadecimal code represent: #000?
black
You can apply a style to a selector within a selector without affecting the same selector outside the parent selector.
True
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”>CSSntax</a>
If the link in the example has been visited, it will be displayed in red
What property can be used to turn everything into uppercase or lowercase letters, or capitalize the first letter of each word?
text-transform
Which of the following sets all the properties for a list in one declaration?
list-style
Which of the following is true for setting font type?
p { font-family:”Times New Roman”,Georgia,Serif; }
What does the property font-family do?
Specifies which font to use
Which of the following will set the entire page background color?
body {background-color:#FFFFFF;}
How do you add a background color for all <h1> elements?
h1 {background-color:#FFFFFF}
Which property specifies the spacing between lines?
line-height
With these specifications, how will the paddings appear in browser? padding: 6px 3px 0px 3px;
top: 6px, right: 3px, bottom: 0px, left: 3px,
What is the best way to insert CSS styles across multiple HTML files?
External CSS
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
How do you designate an inline style?
style = ” “
What does background-origin property do?
It specifies the positioning area of the background images.
What property changes the text color of an element?
color
What is the correct selector format for ID elements in CSS, where id_name is unique ID name to be formatted?
#id_name { }
Which value is used to define a dashed border?
dashed
What property is used to a set minimum height for an element?
min-height
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?
Responsive
Which of the following sets how a background image will be repeated?
background-repeat
Which CSS property can provide to add an effect when changing from one style to another,without using Flash animations or javascript?
Transitions
What does the border-radius property do?
Creates rounded corners
Which CSS property controls the text size?
font-size
Which of the following places one or more images in the background of the element?
background-image
True or False: Hexadecimal color values are supported in all major browsers.
True
Which of the following CSS3 properties is used to round the corners of elements?
border-radius
In which example below will all HTML elements with class=”master” will be center-aligned?
.master {text-align:center;}
The id selector uses the id attribute of the HTML element, and is defined with a
“#”
Which answer best describes the following css rule? a {text-decoration:none;}
Links will be styled with no underlines
How do you add a background color?
div {background-color : red}
Which of the following CSS declarations would change the border style?
border-style: solid;
Colors in CSS can be specified by the following methods:
All of these
Which property is used to control the space between the border and content in a table?
padding
Which tag is used to link External Style Sheets?
<link>
Which of these is not a vendor prefix?
They are all vendor prefixes.
What does CSS stand for?
Cascading Style Sheets
In CSS, it is possible to specify different padding for different sides?
Yes
.center {text-align:center;} is an example of
the class Selector
How do you add a background color for all “<h1>” elements?
h1 { background-color: #FFFFFF; }
When does aligning a block element have no effect?
when it’s width is set to 100%
Which property can be used to set the color of a text?
color
Pseudo-elements can be combined with CSS classes.
True
Which configuration of the web elements in the page markup gives you great flexibility in the design of your site?
All are correct
What symbol do you use in CSS to call out to an ID?
#
Is this a proper statement? body { font-family: Arial, Helvetica, sans-serif; color: #000; background-color: #FFF; }
Yes
Which syntax displays hyperlinks with an underline?
a {text-decoration: underline}
Which of these is the correct format for specifying a color?
All of the above
Which is the correct CSS syntax?
body {color: black}
What is the default file extension for a CSS style sheet?
.css
Which of the following properties is used to set a minimum width on an element?
min-width
Which CSS property controls the text size?
font-size
Where in an HTML document is the correct place to refer to an external style sheet?
In the <head> section
How do you add a background color for all <h1> elements?
h1 { background-color: #FFF; }
What pseudo-class need to be used to style a link which has the mouse over it?
a:hover
The outline property is used to control:
all of these
What do the height and width CSS dimension properties allow you to control?
the height and width of an element
Which of the following characters is used to end a css declaration block?
}
Which of these is the correct way to specify color?
All of these
Where in an HTML document is the correct place to refer to an external style sheet?
In the <head>
Which is the correct way to write a comment in CSS?
/*This is a comment*/
What is the correct HTML for referring to an external style sheet?
<link rel=”stylesheet” type=”text/css” href=”main.css”>
Which is the correct CSS syntax?
selector { property: value; }
The class selector is used to specify a style for:
a group of elements
Which of the following is NOT a web-safe font?
Zapfino
What property alters an elements background color?
background-color
Which property is used to specify the kind of border to display?
border-style
Which is the correct CSS syntax?
body { color: red; }
What are the possible values of the property background-attachment?
Both scroll and fixed
What css selector selects all elements?
*
What does the background-color property do?
Specifies the background color of an element
Which of the following increases or decreases the horizontal space between characters?
letter-spacing
Which tag is used to define an Internal Style Sheet?
<style>
Dimension properties allow you to control:
the height and width of an element
Who maintains CSS?
W3C
Which element/pseudo-element pair can be used to create a mouseover effect on all links?
a:hover
CSS stands for
Cascading Style Sheets
When does the link state a:hover occur?
When the user mouses over it
What is the correct HTML for referring to an external style sheet?
<link rel=”stylesheet” type=”text/css” href=”mystyle.css”>
In an HTML document, where is the correct place to refer to an external CSS file?
In the <head> section
Which of these is the correct CSS syntax for specifying the left margin of an element?
p {margin-left:20px;}
What is the extension for an external style sheet?
.css
Which answer best describes the purpose of the following markup? <link rel=”stylesheet” href=”style.css” type=”text/css” />
To call an external stylesheet
Which of the following determines whether the text should be displayed as italics or regular text?
font-style
Which HTML tag is used to define an internal style sheet?
<style>
Which property is used to change the background color?
background-color:
An id is prefaced by what symbol?
#
What is the correct HTML for referring to an external style sheet?
<link rel=”stylesheet” type=”text/css” href=”mystyle.css”>
Where in an HTML document is the correct place to refer to an external style sheet?
In the <head> section
What does CSS stand for?
Cascading Style Sheets
What should CSS be used for?
styling
Which symbol is used to define an ID?
# (pound sign)
Which properties can be applied to first-line pseudo-element?
All of these
The background color can be specified by:
All of these
What is the correct HTML for referring to an external style sheet?
<link rel=”stylesheet” type=”text/css” href=”mystyle.css”>
What does CSS stand for?
Cascading Style Sheets
.css files may be created using what software?
All of these, any text editor will do.
Which character, followed by the selector’s name, is used for defining ID selectors?
#
Where in an HTML document is the correct place to refer to an external style sheet?
In the <head> section
Hex colors are based off of what other web based color mode?
RGB
Is :focus a pseudo-class?
Yes
A class is prefaced by what symbol?
.
The id selector uses the id attribute of the HTML element, and is defined with a…
“#”
Which HTML attribute is used to define inline styles?
style
Block elements can be centered by setting the left and right margins to:
auto
What does the float property do?
Aligns HTML elements to the right or left while allowing content to flow around it
Which CSS property contains the following attributes: normal, italic, oblique
font-style
What css selector Insert content before every <p> element
p:before
Which of the following code elements will ensure that all images have no border?
img { border: none; }
Which is the correct syntax for centering the text in the header?
h1 {text-align: center;}
The ________ property is used alongwith position property to create an effect of layers
z-index
What does the scale() method do?
It increases or decreases the size of element
To set the bottom border width…
border-bottom-width:15px;
Which css property can be used to display text with all uppercase, all lowercase, or with forced first-letter capitalization?
text-transform
What is the main difference between styling a <span> and a <div> element?
<span> is an inline element by default, while <div> is a block element.
Which of the following ways below is correct to write a CSS?
body {color: black}
Which is the correct CSS syntax?
<p style=”text-align:left;color:#00CC00″> This text is in left. </p>
The default value of the font-variant property is
normal
What property is used to a set maximum height for an element?
max-height
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 transparent.
In margin: 10px 20px 40px 30px; what will be the bottom margin?
40px
Which of the following always refers to text color?
color
Which of the following is correct to transform text to lowercase?
p {text-transform:lowercase;}
Which of the following will set Verdana as the entire page’s font type?
body {font-family: Verdana;}
What is a CSS rule?
Statements that tell the web browser how to render certain element or elements on the page.
The background image for a page can be set like this:
body {background-image:url(‘sand.gif’);}
What is the correct method of changing text color?
{color:#000000;}
Which answer best describes the following statement? <div style=”text-align:center; font-size: 14px;”></div>
Inline CSS
With what character does a declaration block start and end with?
starts with { and ends with }
Which of the following pseudo-elements are invalid?
;last-paragraph
Which is the correct syntax of the background color for links?
a:link {background-color:#B2FF99;}
Which of the following is NOT a CSS font property?
font-invariant
Selects all elements with class=”intro”
.intro
How can you assign a higher specificity to a property value?
body { background: blue !important; }
Which HTML tag is used to define an internal style sheet?
<style>
They must be define a border-style for the border to show up. Available terms:
All are correct
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; }
On which side will there be a 20px padding if this is the specified: padding: 30px 15px 20px 10px;
bottom
Which of these can be used to apply style rules to elements in a document?
All of these
Internet Explorer supports the fixed value only if…
!DOCTYPE is specified.
Which of the following is NOT a valid technique for applying styles to a document?
exceptional styles
Which of the following removes the bullet from an unordered list?
list-style-type: none;
How do you make the text bold?
font-weight:bold
Which of the following is an example of using group selectors?
h1, h2, p { color:green;}
The ………………… specifies whether a border should be solid, dashed line, doted line, double line, groove etc.
border-style
How do you display hyperlinks without an underline?
a {text-decoration:none}
How can you add a comment to a stylesheet?
Enclose comment between opening and closing comment markers as follows: /* and */
Which property can be used to control the flow and formatting of text?
white-space
Which are the two main parts of a CSS rule?
Selector and Declaration
Which of the following css declarations will create bold text?
{font-weight: bold;}
Which of the following is correct to transform text into uppercase?
h1 {text-transform:uppercase;}
Which of the following css declarations would style hyperlinks using sans-serif fonts?
a:link {font-family: “lucida sans unicode”, sans-serif;}
Setting the left and right margins to auto specifies that they should split the available margin equally, resulting in…
a centered element
Which css rule will make an element with an id of “box” invisible?
#box {visibility:hidden}
What CSS define in HTML?
How to display HTML elements
Which contemporary web browser(s) support CSS?
All of these
What selector is used to select all elements?
*
Which Represents a line that acts as a boundary?
Border
True or False: The universal selector, written “*”, matches the name of any element type. It matches any single element in the document tree.
True
Can web fonts be imported with .css files directly
Yes, by using @import url(“fontname”);
A ……… tag is used to specify that the browser is to fetch and use an external style sheet file
<link>
Which of the following will set h1 to 16 pixels, bold, and underline?
h1 {font-size: 16px; font-weight: bold; text-decoration: underline;}
A ___________ property can help you to create more complex webpage layouts
z-index
Which of the following selects the active link?
:active
Negative values for transition-duration are treated as
0
What are the three methods for using style sheets with a web page?
Inline, embedded or document level and external
Which of these has the highest priority?
inline style
How much space does an element take up within the document (on modern browsers) if it has “display: none” styling applied?
It will not take up any space.
What does the pseudo class last-child do?
selects the last element in a targeted parent element.
Which of the following is the correct syntax for importing one style sheet into another?
@import url(“other.css”);
The CSS list properties allow you to:
All are correct
What is the correct CSS syntax for making all the <p> elements bold?
p { font-weight: bold; }
How to apply the text-shadow around the text?
<p style=”text-shadow:6px 6px 10px #FF0000 “> Text-shadow is of red color. </p>
The ________________ specifies whether a border should be solid, dashed line, doted line, double line, groove etc.
border-style
Which of these examples of using the clear property are correct?
.text_line { clear:both; }
How can you create responsive websites through css?
Use an @media query.
True or False : CSS class name starting with a number is supported by all browsers.
False
In CSS, the term “box model” is used when talking about?
design and layout
What is the correct shorthand syntax for a border?
border: 1px solid #777;
What attribute is NOT required when using the <link> tag?
head
Which side of the element with ID ‘element’ will have a 10px margin? #element { margin: 0px 5px 10px 20px;}
bottom
Which of the following defines the boundary within the element box against which background-image positioning is calculated?
background-origin
Which of the following sets all the border properties in one declaration?
border
How will this display: margin: 10px 5px;
Top: 10px, right: 5px, bottom:10px, left:5px
Which property is used to horizontally align the text in the table?
text-align
Which is the correct syntax of css border?
.two { border: solid 6px #fff; position: relative; z-index: 1; }
Which of the following applies a 2D or 3D transformation to an element?
transform
True or False? With CSS, it’s possible to customize the numbers that appear next to list items within <ol> elements.
True
Which of the following sets the stack order of a positioned element?
z-index
CSS comments are inserted inside .
/*………………*/
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] { }
Which of the following will apply a hex color of #445566 to each active link?
a:active {color:#445566;}
Which of the following is the correct syntax for using z-index?
img {z-index:-1;}
Which line changes the background color of a link when a visitor hovers it?
a:hover { background-color: #FF704D; }
How do you specify 30% opacity in CSS (ignoring IE)?
opacity: 0.3
The ___________ property allows to specify how much space appear between the content of an element and it’s border.
padding
What are the two components of every CSS style definition?
selector, properties
The <link> tag goes inside
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?
overflow: auto
In reality layers are often used in more dynamic ways:
All are correct
Normally, elements after a ‘floated’ element will flow around it. Which property can be used to avoid this?
the clear property
With what characters are multiple fonts separated with?
commas
The ____________ property allows to specify how much space appear between the content of an element and it’s border.
Padding
What do the Greater Than sign > indicate in CSS
Select the child of the element it follows
Identify the selector in the following rule: h1 { color: blue; }
h1
Block elements can be aligned to center by setting the left and right…
margins to auto
How do you hide an element and remove it from the document flow?
Add “display: none” to your style sheet rule.
Which property controls the additional space between the selected element(s) border and its content?
padding
Which of the following declarations would display a list without bullets?
list-style-type: none
What css selector selects all <p> elements that are contained inside of an element with an ID of ‘content’?
#content p
Which of the following is NOT a valid image opacity rule?
opacity: 2.0;
By which of the following is a declaration terminated?
;
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
Which is the correct CSS syntax?
<p style=”direction:inherit”> Possible values are ltr,rtl and inhert. </p>
How do you remove browser default margin and padding settings?
Set margin and padding to 0
To create a border of 3-pixel width, which css declaration would you use?
border-width: 3px;
The text-decoration are:
All are correct
Which is the correct syntax for referring to a pseudo-class?
:hover
Which property gets provide the increments or decrements the space between characters?
letter-spacing
What css selctor Selects every <p> element that is the last child of its parent?
p:last-childc
Which HTML tag is used to define an embedded style sheet?
<style>
Pseudo classes may be applied to any element but are most commonly used with the __ element.
‘a’
__________ property is mostly used to remove underlines from links:
text-decoration
How do you make a list that lists its items with squares?
list-style-type: square
Which property can be used to decorate links by specifying no underline with the text?
text-decoration:none
What does the child selector (“>”) do?
Matches elements that are a direct child of the parent match
What css selector selects the input element which has focus?
input:focus
If table {color: red;} is specified in a stylesheet, what happens to the table?
Text within it is red
How do you set a paragraph to have a border of 5px in red color?
p { border:5px solid red; }
Hex values are written as 3 double digit numbers, starting with a
# sign
Which of the following characters is used to begin a css declaration block?
{
What is the child selector in css?
>
Which styles of border can be look in dotted?
border-style: dotted;
How can you override css cascade priority and force a particular css rule to apply?
p { color:red !important; }
What does the property text-align:center; do?
Aligns text in horizontal center of the containing element
When using the background-color property with rgba(255, 0, 255, 0.5) what does the “a” refer to?
Opacity (Alpha channel)
Which of the following has the highest priority?
Inline style (inside an HTML element)
How do you apply multiple classes to an element?
<div class=”class1 class2″ ></div>
Which of the following is true about border styles?
None of these
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?
<do></do>
The correct example of class selector is .
h2.type1 {color: #000000;}
Which syntax does older versions of Internet Explorer use for transparency?
filter:alpha(opacity=x).
Which concept uses the CSS from which implies that every HTML element is a box?
box model
If an image is floated to the right, the following text flows around it…
to the left
Which of the following is true about vertical-align property?
It sets the vertical alignment of an element.
When adjusting a CSS sprite, which property do you use?
background-position
Which measurement can’t be used to size text in CSS?
huge
Which of the syntax is correct?
<div style=”position:relative; font-size:50px; z-index:2;”>LAYER 1</div>
Which style will cause all links to “http://www.smarterer.com” to be blue?
a[href=”http://www.smarterer.com”%5D { color: blue; }
With what characters are CSS declarations separated?
semicolon ( ; )
Which property is used to set whether table borders are collapsed into a single border or detached as in standard HTML?
border-collapse
To specify the style for a list, use the _________ property.
list-style
Which style does the following rule apply to?
div.wrapper h2 {
font-size: 18px;
margin-top: 0px;
}
h2 heading inside element div of class wrapper
When using z-index which other property is required?
position
In CSS3, which property is used to make sure a given element has a width of at least a set value?
min-width
Multiple font faces are separated by __________
Comma
Which of the following produces a black border that is 1-pixel thick and dashed?
border: 1px dashed #000
Which is the correct syntax of the CSS?
<p style=”font-size:14pt”> Welcome to teds-india.</p>
Which declaration will make each word in an element start with a uppercase letter?
text-transform: capitalize;
What does minifying CSS do?
compresses the code by removing whitespace, which is not needed
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’ /> .
The transition-duration property is in fact the only property required
All are correct
What css selector selects all <div> elements and all <p> elements?
div,p
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.
Which of the following will remove the default underline under the link with an id of “content”?
a#content {text-decoration:none;}
On which position value does the z-index property work?
all of the answers
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 Sprites
The id selector is used to specify a style for
single, unique element
Given .class { padding: 20px 10px; }, in what order do padding values apply?
top & bottom, left & right
What of the following is the correct syntax in CSS?
Selector {Property: Value;}
By default, the background-image property repeats an image..
both horizontally and vertically
Which of the below is the correct way to set the color of active links?
<style type=”text/css”> a:hover {color:#000000} </style>
The completion of a CSS Transition generates a corresponding
DOM Event
An ____ style loses many of the advantages of style sheets by mixing content with presentation.
Inline
Where is the margin property located in the CSS box model?
Outside the box
The following syntax to set margin around a paragraph will make- p{margin:10px 2%}
Top and bottom margin will be 10px and left and right margin will be 2% of the total width.
Which part of the box, where text and images appear?
Content
Which of the following selects all unvisited links?
:link
Which operator is used for pseudo classes?
: (colon)
What is the CSS syntax for changing the default cursor to a pointing finger?
cursor: pointer;
Which declaration can be used to have a block element always displays scrollbars?
{overflow:scroll}
How do you hide an element, but have it still take up space and affect the layout?
visibility: hidden;
Which of the following applies a different background color for odd numbered rows in a given table?
tr:nth-child(odd)
You have three blocks of markup that share property values. Which of the following ways is the most efficient?
.one, .two, .three { property: value; }
What is true about image sprites?
Both of these
Which declaration removes bullets from a navigation list?
list-style-type:none
What CSS selector selects all elements with a target attribute?
[target]
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.
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:target
Why will the following declaration not work? p {
margin-right: 80 px;
}
there is a space between 80 and px
What is the syntax for a customized cursor?
Selector {cursor:value}
Which property specifies spacing behavior between text characters?
letter-spacing
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
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?
fixed
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
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 <div> element
Which element is a block element?
All
If the name of a font family is more than one word, it must be in quotation marks.
True
Which is the correct CSS syntax?
<p style=”direction:ltr”> This text is in left direction. </p>
If an image is floated to the right, where does a following text flow?
around it, to the left
Which of the following specifies the type of list-item marker?
list-style-type
The text-align property is used to set the ______ alignment of a text.
horizontal
How do you target the submit button for the <form id=”example”>?
#example input[type=”submit”]
____________ properties provide several options to place the content on the web page.
Positioning
What does the * stand for in CSS?
Universal Selector
The pseudo selector “:nth-child(2n)” can also be written as:
:nth-child(even)
The caption-side property specifies the placement of a table caption. Which of the following is NOT a valid value?
side
The possible values of direction properties are
ltr and rtl
Is a # required before colors in CSS?
No, only when specifying colors as hexadecimal values.
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 2px 0 10px}
Given the following css rule, where would the style apply?
#content table tr td ul li a {font-weight:bold;}
Links inside of a list inside of a table inside of an element with an id of ‘content’
What is the scale for opacity from least to most?
0 – 1
The ____ and ____ properties defines the exact position of our layer.
top,left
In which direction are elements floated?
Horizontally
How do you add images to list items?
list-style-image: url(../images/bullet.gif);
Which properties specifying whether to write the text from left to right or from right to left?
direction
What is the direction property in CSS?
It specifies the text direction/writing direction.
When determining hex colors, which value is the greatest
f
An outline is always placed __________ of the box
Outline
Which of the following css declarations will create italicized text?
{font-style: italic;}
The_________ means unvisited hyperlinks.
:link
p.outset {border-style: outset; } In the code snippet above, which part represents the property?
border-style
The following is an example of which type of CSS selector?
E > F
Child selector
Which of the following elements will be matched by the CSS selector: div[class*=”foo”] ?
All of these elements will be matched.
The_____________ property indicates whether a cell without any content should have a border displayed.
empty-cells
What is the effect of the following css rule?
[title]{color:blue;}
All elements with a title attribute will be blu
All elements with a title attribute will be blu
to move elements from their current position by an offset depending on the X and Y parameters
What hyperlink property specifies whether new destination links should open in a new window or in a new tab of an existing window?
target-new
What does “padding:15px 20px 25px” mean?
- top padding is 15px – right and left paddings are 20px – bottom padding is 25px
Which property is used to set all the outline properties in one declaration?
outline
Select the correct value to set the background to silver for even rows.
tr:nth-child(2n) {background: silver;}
The First step of transition is
transition-property
Which of the following tells the browser where you want to apply the rule?
Selector
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-True, ii-True
Which of the following is true about inline styles?
They will override a style defined inside the <head> tag, in an external style sheet or in a browser (a default value).
Which of the following specifies what the style actually does?
Properties
Write the css selector for the 3rd list item within an ordered list
li:nth-child(3) { // do something }
how to set multiple images in background through css
background-image: url(xyz.png), url(a2z.png);
What are the correct values for “float” property?
left, right, none
The elements after the floating element will…
flow around it
Which of the following is true for the max-width property?
The max-width property does not include padding, borders, or margins.
The box model consists of which of the following:
margins,borders, padding, and the actual content
Fonts such as Times New Roman which have spaces in between must be wrapped inside ______
Quotation Mark
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 1px 5px 20px;
Identify the value in the following rule: a:hover { text-decoration: none; }
none
What does the following declaration accomplish? div{background-color: rgba(255,255,255,0.8); }
It sets a white background with a transparency of 80% to the div element.
Which at-rule allows you to define custom fonts?
@font-face { }
What property is used with the :before and :after pseudo-elements to insert generated content?
content
Which of the following best describes the effect that a floated element has on surrounding elements?
The elements after the floating element will flow around it.
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
The possible values of white-space are
All are correct
Which of these is NOT a CSS pseudo-class?
a:blur
Which of the following color values is invalid?
They’re all valid.
Which version of CSS supports this tag :nth-child ?
CSS 3
What CSS selector selects all elements with a target attribute?
[target]
Which of the correct syntax css cursor code?
p { cursor: wait } h4 { cursor: help } h5 { cursor: crosshair }
What is NOT an advantage of using CSS files?
Ability to hide the CSS code from the user.
The Hex color #0000FF is equal to:
blue
What character is used before the pseudo-class property?
What character is used before the pseudo-class property?
What does the background-attachment property do?
It sets whether a background image should scroll with the content, or be fixed.
What does the following selector do: element[foo]
Matches any element with the foo attribute set.
Pseudo-classes are used to represent _______.
Dynamic Events
Which selector specifies that a list uses squares?
list-style-type: square;
Which of the following code samples could be used to style a link whose URL begins with “https://sales.“?
a[href^=’https://sales.’%5D { color: pink; }
Which of the following is true about the overflow property?
It specifies what happens if content overflows an element’s box.
What does “Cascading” in CSS refer to?
The hierarchy of rules which determines how element properties are inherited
What is the border-spacing property?
It sets the distance between the borders of adjacent cells (only for the “separated borders” model).
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
What CSS syntax can be used to hide an image without affecting the documents layout?
visibility: hidden
What would the following do?
tr:nth-child(2n){background-color: red; }
Changes the background color of every even number table row to red
Which colors are displayed using an equal amount of power to all of the light sources ?
gray
To ensure consistent behavior when the user resizes text, font-size should be declared in units of:
em
A CSS ________ is a keyword added to selectors that specifies a special state of the element to be selected.
pseudo-class
Which list-style-type property renders a filled circle?
disc
The Text spacing properties ar
All are correct
When using “position: absolute;” the reference point is the browser window UNLESS one of the parent elements contain one of the following…
position: relative
When styling links, a:active must come _____ a:hover.
after
What property defines whether background images scroll along with the element when the document is scrolled?
background-attachment
What is the name for a property that clears an area outside the border and is completely transparent?
margin
What does the following mean:
ul[id^=”name-here”]
target any <ul> with an ID that starts with ‘name-here’
All monospace characters have the same…
width
Which property allows you to increase or decrease the white space between words?
word-spacing
The transition-duration property’s initial value is 0, meaning that the transition is
instantaneous
In which position it will be calculated from the upper left corner of the parent layer?
position:absolute
What does the outline-offset property do?
Both of the other answers are correct.
Which of the following is invalid ?
.selector { background-image: content(“image.png”); }
Which properties allow specifying the formatting rules for the textual content on a Web page?
CSS text
Which type of border attribute can be used to have a unique look for each side of the border?
border-(direction)
Which types of the border style can looks as though it were embedded in the canvas?
inset
Which of the following properties is MOST likely to increase the amount of time it takes the browser to repaint?
box-shadow
Which of the following is NOT a common browser layout engine that determines CSS default styles?
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.
False
What is the default align for <tfoot>?
left
What is absolute positioning?
When an element is positioned relative to the first parent element that has a position other than static.
What has the greatest specificity?
#footer {background: white;}
Which properties of css can be provide the various division?
Layers
A user can only view the border after specifying the
All are correct
Which property is used to specify type faces ?
font-family
The ______________ property describes how the intermediate values used during a transition will be calculated
transition-timing-function
What is the cascading order (from lowest to highest priority) when there are multiple styles specified for an HTML element?
1) browser default, 2) external style sheet, 3) internal style sheet (in the head section), 4) inline style (inside an HTML element)
Which property is used to specify typefaces ?
font-family
If an element appears before a floated element that element will…
not be affected.
Which of these is not a valid generic font-family?
handwriting
Which value will continue to display the text on the same line,until the BR element is specified?
nowrap
What is the effect of using a negative number in a padding declaration? Example: p {padding-top: -10px;}
Same as padding-top: 0px;
What is the default value of position: ?
static
Which vertical-align value is not correct?
vertical-align: text-base
Which of the following is correct for specifying the print media type?
@media print { p.test {font-family:times,serif;font-size:10px;} }
Which one is not a correct value of clear property?
clear:all;
Which of the following is correct for the word-wrap Property?
p.test {word-wrap:break-word;}
In which position will be calculated from that exact spot in the middle of your page where it was added?
position:relative
In the following line;
H1 { color:blue }
What is the part within the curly braces?
Declaration
How can you keep the parent element from collapsing when all elements inside are being floated?
All of these
If the link to the external css is placed after the embedded css in the <head>…
the external styles will override the embedded styles.
Which aspect of CSS has some direct resemblance with the common regular expression syntax?
Attribute selectors
What is the specificity calculation for an ID in CSS?
100
What is the adjacent sibling selector?
+
Which value of display property is NOT valid?
display: inline-caption;
Which of the following is true about this style?
border-width: thin medium thick 3px;
The left border will have a thickness of 3px.
In CSS tables, the possible values for the caption-side property can have the following values.
top, bottom, left or right
Which of the following selectors is the MOST efficient?
#menu .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;}
Which part of the following selector does the browser parse first?
ul > li a[title=”home”]
a[title=”home”]
Which value preserves the white spaces as specified in the content?
pre
What does the CSS cue property do?
Specifies a sound to be played before and after the selected element
Describes how the speed during a transition will be calculated. Default “ease”
transition-timing-function
The value of letter-spacing property is
either normal or of length type
Which of the following is correct CSS syntex for using font property?
<p style=”font: italic bold 15px;”> ………………….. </p>
With regards to the cascade effect of CSS, when does the order of css style rules matter most?
When the rules are equal in specificity.
A Group of font families with a similar look
generic family
How do you select all the first <p> elements that immediately follow a <h2> element?
h2 + p { }
Which of the following is NOT valid.
visibility: none
Which of the following text-decoration styles is not correct?
text-decoration: strike-through
Which of the following declarations is incorrect?
table { display: table-column-grouped; }
Which of the following properties can be used to create multiple columns for laying out text – like in newspapers?
column-count
The css property border-style:dotted solid; would have the following effect:
Would specify different borders for different sides
What does the CSS speak-header property do?
Specifies whether table headers are spoken before every cell
What is the total width for this div :
div { width: 100px; margin: 5px; padding: 10px 5px 15px 5px; border: 5px solid #000; }
130px
What is the recommended order for styling an <a> tag?
a:link { } , a:visited { } , a:hover { } , a:active { }
Which of the following is a required box-shadow property?
h-shadow
The color names are defined in the HTML and CSS color specification (___ standard colors plus ____ more).
17,124
The _______________ property allows to specify the distance between the list and the text relating to the list.
marker-offset
What page media property gives a hint for how to scale a replaced element if neither its width nor its height property is auto?
fit
Which of the following specifies the number of times an animation should be played?
animation-iteration-count
Which is not a valid pseudo class?
:nth
In css border radius is not supported by Internet explorer version under
7
Which of the following is not a pseudo class?
first
Who published the original proposal for CSS
Håkon Wium Lie
Which of the following declarations is incorrect?
ul { list-style-type: roman; }
A final property is the visibility property that will allow you to create
invisible layers
Very interesting possibilities arise from the fact that the z-index can be dynamically changed with
javascript
To use inline styles you use the style attribute in the …………… tag
relevant tag
When can a semicolon be omitted?
Inline style setting in an HTML tag
position: absolute means…
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?
contain
Specifies a rotation in the right or clockwise direction that a user agent applies to an image
image-orientation
- The head section
Which of the following elements takes up the full width available, and has a line break before and after it?
Block element
Comments
Post a Comment