KEMBAR78
Complete CSS Exam | PDF | Computing | Text
0% found this document useful (0 votes)
16 views10 pages

Complete CSS Exam

This document contains 24 multiple choice questions about basic CSS concepts such as properties, units of measurement, selectors, and more. The questions cover topics like how to define colors, borders, fonts, margins, and other visual aspects using cascading style sheets.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views10 pages

Complete CSS Exam

This document contains 24 multiple choice questions about basic CSS concepts such as properties, units of measurement, selectors, and more. The questions cover topics like how to define colors, borders, fonts, margins, and other visual aspects using cascading style sheets.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

d) a {text-decoration:none}

Complete CSS
Question 5:
Question 1: How do you define a background color for all <h1> tags in CSS?
What property does not exist in CSS? a) h1.all {background-color:#FFFFFF}
a) border-color b) all.h1 {background-color:#FFFFFF}
border-line c) h1 {background-color:#FFFFFF}
c) border-style d) h1.* {background-color:#FFFFFF}
border-width
Question 6:
Question 2: In CSS, to define the space between the border of an element and the elements
that surround it, the property is used
How can the left margin of an element be changed with CSS?
a) border
a) text-indent
b) margin
b) indent
c) padding
c) marginleft
d) The previous answers are not correct.
d) margin-left

Question 7:
Question 3:
What property does not exist in CSS?
In CSS, what does the number marked with (b) mean in the following rule? {box-
shadow: (a)10px (b)10px (c)5px (d)#FFF;} a) font-face
a) The width of the shadow b) font-size
b) The horizontal displacement c) font-style
c) The vertical displacement font-variant
d) The level of dispersion
Question 8:
Question 4: In CSS, what value of the overflow property forces the scroll bars to
should displacement always be visible, even if they are not necessary?
How do you make a link display without an underline in CSS?
always
a) a {underline:no-underline}
b) car
b) a {underline:none}
c) visible
c) a {text-decoration:no-underline}
d) The previous answers are not correct d) <style>

Question 9: Question 13:

In CSS, what does 'text-transform: capitalize;' do with the text 'this is a What does CSS mean?
simple test?
a) Cascading Style Sheets
THIS IS A SIMPLE TEST
b) Creative Style Sheets
b) This is a simple test
c) Computer Style Sheets
This Is A Simple Test
d) Colorful Style Sheets
d) The previous answers are not correct

Question 14
Question 10:
In CSS3, which property is used to define the shadow of an element?
How is it done in CSS so that each word in a text starts with a like a div?
TEXT IN UPPERCASE?
border-shadow
a) text-transform:capitalize
b) box-shadow
b) text-transform:uppercase
shadow
c) text-transform:first-letter
d) The previous answers are not correct
d) It cannot be done with CSS

Pregunta 15
Question 11:
What is the correct XHTML code to reference a stylesheet?
What CSS property is used to define the space between words? external?

a) word-spacing <style src="style.css" />

b) letter-spacing b) <stylesheet>style.css</stylesheet>

c) white-space c) <link rel="stylesheet" type="text/css" href="style.css" />

d) text-indent <script rel="stylesheet" type="text/css" href="style.css" />

Question 12: Question 16:

What HTML tag is used to define an internal stylesheet? In CSS, to define the space between the border of an element and its content
the property is used
a) <css>
border
b) <link>
b) margin
c) <script>
c) padding
d) The previous answers are not correct. d) The previous answers are not correct.

Question 17: Question 21:

In CSS, "em", "%" and "pt" are What is the correct syntax in CSS?

a) Relative units of measure color:black

b) Absolute units of measurement b) {body:color=black}

c) Units of measurement, but 'em' and '%' are relative and 'pt' is absolute c) body {color:black}

d) Units of measurement, but "%" is relative and "em" and "pt" are absolute d) body {color=black}

Question 18: Question 22:

In CSS, which property is used to define the display order? In CSS, how is a border defined in the following way?
when several elements overlap? Top border: 10 pixels
Bottom border: 5 pixels
a) alpha-index Left border: 20 pixels
Right border: 1 pixel
b) tab-index
a) border-width: 10px 20px 5px 1px
c) vertical-index
border-width: 10px 1px 5px 20px
d) The previous answers are not correct
5px 20px 10px 1px

Question 19: border-width:10px 5px 20px 1px

In CSS, what property is used to control what happens when the


the content of an element does not fit in the space allocated to the element? Question 23:
a) content Which CSS property is used to define the height of a line of text?

b) display height

c) float b) line-height

d) The previous answers are not correct. c) vertical-height

d) The previous answers are not correct.


Question 20:

What HTML tag is used to define an external stylesheet? Pregunta 24


a) <link> In CSS3, what does the HSL color scheme mean?

b) <script> Height

c) <style> b) High Saturation Low


c) The content
c) Hue Saturation Lightness
d) The format
d) The previous answers are not correct

Question 29:
Pregunta 25
What CSS property is used to indicate that a text should be displayed
In CSS, how do you write a selector so that a rule applies to all in italics?
paragraphs that appear just after a level 1 heading?
a) italic font
a) h1 p
b) font-style
b) h1,p
c) font-variant
c) h1>p
d) The previous answers are not correct.
d) h1+p

Question 30:
Question 26:
In CSS, which rule selects the first item of a list?
In CSS3, which elements does the :empty pseudo-class select?
a) li:first
a) The elements that are invisible
b) li:first-child
b) The elements that have no parent
c) li:first-element
c) Elements that do not have children
d) The previous answers are not correct
d) The elements that do not have an associated CSS rule

Question 31:
Question 27:
How can CSS be used on a web page?
How do you change the text color of an element in CSS?
Linked and inserted
a) textcolor
b) Linked, inserted and online
textColor
c) Linked, embedded, online and filtered
c) color
d) The previous answers are not correct
d) fgcolor

Question 32:
Question 28:
Regarding the RGB system for representing colors on a webpage
Which of the following things does not define CSS?
a) The code FFFFFF represents the color white
a) The presentation
b) The code FFFFFF represents the color black
b) The design
c) The code FFFFFF does not exist
c) <link rel=stylesheet type=text/css href=style.css />
d) The previous answers are not correct.
d) <link rel=stylesheet type=text/css href=style.css>

Question 33:
Question 37:
In CSS, to display list items in a single line
instead of one under the other, it is used What is the correct CSS syntax for all <p> elements
appear in bold?
a) list-style-display: inline;
a) p {text-decoration:bold}
b) list-style-position: inline;
b) p {text-size:bold}
c) list-style-type: inline;
c) p {text-style:bold}
d) The previous answers are not correct
d) p {font-weight:bold}

Question 34:
Question 38:
Indicate what is the CSS code that defines a border of an element of 2 pixels
wide, black and dotted Indicate which is the incorrect statement regarding the definition of CSS styles.
on an XHTML page
a) border: 2px double #000000;
a) They can be defined within the page with the code <style>
b) border: 2px dashed #000000; type="text/css">...</style>

c) border: 2px solid #000000; b) They can be defined within the page with the code <p style="...")>...

2px dotted #000000


c) It is possible to link to an external file with the code <script
language="css" type="text/css" href="styleSheet.css"></script>
Question 35:
d) You can link to an external file with the code <link
In CSS, what property is used to insert generated content? rel="stylesheet" type="text/css" href="stylesheet.css" />

a) content
Question 39:
b) created
What CSS property is used to change the font type of a
c) generated element?

d) insert a) text-type

b) font-type
Question 36:
c) text-family
What is the correct XHTML code to reference a stylesheet?
external? d) font-family

a) <link rel="stylesheet" type="text/css" href="style.css" />


Question 40:
b) <link rel="stylesheet" type="text/css" href="style.css">
How do you center text in CSS?
a) center: true In CSS3, what does the 'A' in RGBA mean?

b) text-center: true a) Advanced

c) align: center b) Alpha

d) text-align: center c) Alternative

d) Ambiguous
Question 41:

In CSS, how is the following rule interpreted? {margin: 10px 5px 15px;} Question 45:

a) top margin 10px, left margin 5px, right margin 15px What HTML elements have little utility unless used with CSS?

b) top margin 10px, right margin 5px, bottom margin 15px a) <a> and <p>

c) top margin 10 px, left and right margin 5px, bottom margin b) <b> y <i>
15px
c) <div> and <span>
d) top margin 10px, bottom margin 5px, left and right margin
15px d) y

Question 42: Question 46:

Indicate what the CSS code is that defines text in red, with the type of In CSS, how do you position an element at the top layer of display?
Arial font and size 14 pixels
a) position: 1000;
Arial
b) top: 1000;
Arial
c) z-index: 1000;
c) text-family: Arial; font-size: 14px; color: #FF0000;
d) The previous answers are not correct
Arial

Question 47:
Question 43:
What CSS property is used to change the background color of a
In CSS, what value defines the right margin in the following rule? {margin: element?
5px 10px 15px 20px;
a) color
5px
b) bgcolor
10px
c) backcolor
15px
d) background-color
20px

Question 48:
Question 44:
In CSS, what is the difference between the properties margin and padding?
a) margin adds blank space inside the border and padding adds In CSS, how do you write a selector so that a rule applies to all
blank space around the edge paragraphs that are direct descendants (children) of an article element
(article)
b) padding adds white space inside the border and margin adds
blank space around the edge a) article p

c) padding adds whitespace around the border and margin b) article, p


increase the border size
c) article>p
d) margin adds whitespace around the border and padding
increase the border size d) article+p

Question 49: Question 53:

How can you make the text appear in bold in CSS? In CSS, which pseudo-class is used to define a property when a
does the element receive focus?
a) font:b
:active
b) style:bold
:hover
c) text:bold
c) :press
d) font-weight:bold
d) The previous answers are not correct

Question 50:
Question 54:
In CSS, a:hover and a:active are both examples of
In CSS3, how is a nearly transparent red color indicated?
a) Attributes
rgba(255,0,0,0.1)
b) Pseudoclasses
b) rgba(255,0,0,0.9)
c) Attribute selectors
c) rgba(255,0,0,10)
d) The previous answers are not correct.
rgba(255,0,0,245)

Question 51:
Question 55:
In CSS, how do you write a selector so that a rule applies to all the
images that have a defined alt text? In CSS, which pseudo-class is used to define a property when the
Does the mouse cursor sit over an element?
a.alt
:active
b) a#alt
:hover
c) a(alt)
:over
d) The previous answers are not correct
on

Question 52:
Question 56: Question 60:

Which of the following is not a valid color code in CSS? In CSS, what is usually used to center content horizontally?

#505050 a) margin: 0 auto;

rgb(355, 0, 0) b) margin: auto 0;

c) red c) margin: center;

#FFF d) The previous answers are not correct

Question 57: Question 61:

How to do it in CSS for the symbol of list elements to be What is the CSS property that allows you to change the font size?
a square?
a) text size
square
b) text-style
b) list-style-type: square
c) font-size
c) list-type: square
d) font-style
square

Question 62:
Question 58:
In CSS3, which property is used to define the transparency of an element?
In CSS, what prefix is used to indicate a specific property of
Firefox browser? opacity

-ff- b) transparency

-moz- c) visibility

-webkit- d) The previous answers are not correct

d) The previous answers are not correct


Question 63:

Question 59: In CSS, to hide an element so that it is not displayed, one uses

What CSS property is used to define the space between characters? a) display: hidden;
the text?
b) display: invisible;
word-spacing
c) display: never;
b) white-space
d) The previous answers are not correct
c) letter-spacing

d) The previous answers are not correct Question 64:


In CSS, to define that the text color is red, one uses cursor

#F00 mouse

b) color: rgb(red); c) pointer

#red d) The previous answers are not correct

d) All answers are correct


Question 69:
Question 65: Which of the following rules is not correct in CSS?

What HTML attribute is used to define inline styles? a) p, h1, h2 { color: green; }

a) class b) p { border: 1px dotted #000000; }

b) css c) div { top: 0 }

c) font d) body{ font-size: 16px; }

d) style
Question 70:
Question 66: Can both CSS classes and IDs be used more than once in the
HTML of a webpage?
What is the correct place in an HTML document to refer to a
external style sheet? a) Yes

a) At the beginning of the document b) Yes, but if the CSS is declared in a separate file

b) In the <head> section c) Yes, but if the CSS is declared on the same web page

c) In the <body> section No

d) At the end of the document


Question 71:
Question 67: How do you insert a comment in CSS?

In CSS3, which property is used to define a border with an image? a) # this is a comment

border-attachment // this is a comment

border-background this is a comment

c) border-image d) /* this is a comment */

d) The previous answers are not correct


Question 72:
Question 68: In CSS3, which of these declarations defines a rounded border with a
radio of 20px in the bottom right corner?
In CSS, which property is used to change the cursor or mouse pointer?
40px 20px 20px 80px

b) border-radius: 40px 20px;

c) border-radius: 20px 20px 40px 20px;

d) border-radius: 20px 40px 60px 80px;

Question 73:

In CSS, to cancel the effects of "floating" elements, the


property

clear

b) display

unfloat

d) The previous answers are not correct

Question 74:

From the inside out, what is the correct order of the box model?

content, margin, border, padding

b) border, margin, content, padding

c) content, padding, border, margin

d) padding, content, margin, border

Question 75:

In CSS, to define the space between the border of an element and its content
The padding property is used, but are negative values allowed?

Yes

b) No

Correct exam Start Delete answers

You might also like