CSS
CSS:20 MCQ. & Answers.
01.What does CSS stand for?
A. Creative Style Sheets
B. Colorful Style Sheets
C. Cascading Style Sheets
D. Computer Style Sheets
ANSWER:C
02.What is the correct HTML for referring to an external style sheet?
A. <stylesheet>mystyle.css</stylesheet />
B. <style src="mystyle.css" />
C. <link rel="stylesheet" type="text/css" href="mystyle.css">
ANSWER: C
03.Where in an HTML document is the correct place to refer to an external style sheet?
A. At the end of the document
B. In the <head> section
C. At the top of the document
D. In the <body> section
ANSWER: B
04.Which HTML tag is used to define an internal style sheet?
A. <style>
B. <css>
C. <script>
ANSWER: A
05.Which HTML attribute is used to define inline styles?
A. font
B. class
C. styles
D. style
ANSWER: D
06.Which is the correct CSS syntax?
A. body {color: black}
B. {body;color:black}
C. {body:color=black(body}
D. body:color=black
ANSWER: A
07.How do you insert a comment in a CSS file?
A. // this is a comment //
B. /* this is a comment */
C. ' this is a comment
D. // this is a comment
ANSWER: B
08.Which property is used to change the background color?
A. bgcolor:
B. background-color:
C. color:
ANSWER: B
09.How do you add a background color for all <h1> elements?
A. all.h1 {background-color:#FFFFFF}
B. h1.all {background-color:#FFFFFF}
C. h1 {background-color:#FFFFFF}
ANSWER: C
10.How do you change the text color of an element?
A. text-color=
B. fgcolor:
C. color:
D. text-color:
ANSWER: C
11.Which CSS property controls the text size?
A. font-size
B. font-style
C. text-style
D. text-size
ANSWER: A
12.What is the correct CSS syntax for making all the <p> elements bold?
A. <p style="text-size:bold">
B. p {font-weight:bold}
C. p {text-size:bold}
D. <p style="font-size:bold">
ANSWER: B
13.How do you display hyperlinks without an underline?
A. a {text-decoration:no underline}
B. a {decoration:no underline}
C. a {text-decoration:none}
D. a {underline:none}
ANSWER: C
14.How do you make each word in a text start with a capital letter?
A. text-transform:capitalize
B. You can't do that with CSS
C. text-transform:uppercase
ANSWER: A
15.How do you change the font of an element?
A. font-family:
B. font=
C. f:
ANSWER: A
16.How do you make the text bold?
A. font:b
B. font-weight:bold
C. style:bold
ANSWER: B
17.How do you display a border like this: The top border = 10 pixels The bottom border = 5 pixels The left border = 20 pixels The right border = 1pixel?
A. border-width:10px 20px 5px 1px
B. border-width:10px 1px 5px 20px
C. border-width:5px 20px 10px 1px
D. border-width:10px 5px 20px 1px
ANSWER: B
18.How do you change the left margin of an element?
A. margin:
B. indent:
C. margin-left:
D. text-indent:
ANSWER: C
19.To define the space between the element's border and content, you use the padding property, but are you allowed to use negative values?
A. Yes
B. No
ANSWER: B
20.How do you make a list that lists its items with squares?
A. list-type: square
B. type: square
C. type: 2
D. list-style-type: square
ANSWER:D
Comments
Post a Comment