Web Programming (3160713) MCQs

MCQs of Basics of HTML andCSS

Showing 41 to 50 out of 73 Questions
41.
Which is the correct CSS syntax?
(a) body {color: black}
(b) body:color=black
(c) {body:color=black(body}
(d) {body;color:black}
Answer:

Option (a)

42.
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:

Option (b)

43.
Which property is used to change the background color?
(a) background-color:
(b) color:
(c) bgcolor:
(d) All of above
Answer:

Option (a)

44.
How do you add a background color for all <h1> elements?
(a) h1 {background-color:#FFFFFF}
(b) all.h1 {background-color:#FFFFFF}
(c) h1.all {background-color:#FFFFFF}
(d) None of this
Answer:

Option (a)

45.
How do you change the text color of an element?
(a) text-color:
(b) color:
(c) fgcolor:
(d) text-color=
Answer:

Option (b)

46.
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:

Option (b)

47.
How do you display hyperlinks without an underline?
(a) a {underline:none}
(b) a {text-decoration:none}
(c) a {text-decoration:no underline}
(d) a {decoration:no underline}
Answer:

Option (b)

48.
How do you make each word in a text start with a capital letter?
(a) text-transform:uppercase
(b) You can't do that with CSS
(c) text-transform:capitalize
(d) text-transform:capitaleach
Answer:

Option (c)

49.
How do you change the font of an element?
(a) f:
(b) font=
(c) None of this
(d) font-family:
Answer:

Option (d)

50.
How do you make the text italic?
(a) font:i
(b) style:italic
(c) font-weight:italic
(d) font-style:italic
Answer:

Option (d)

Showing 41 to 50 out of 73 Questions