CSS MCQ (Mulitple Choice Questions and Answers)
-
CSS stands for
Common style sheet
Config style sheets
Cascading style sheets
-
Which of the following is the correct syntax for inline style?
<h1 style:'color=red'>Sample</h1>
<h1 style='color:red'>Sample</h1>
<h1 'style=color:red'>Sample</h1>
-
Which of the following is the correct syntax for add an external style sheet?
<style href='main.css'></style>
<style src='main.css'></style>
<link rel='stylesheet' type="text/css" src='main.css'>
<link rel='stylesheet' type="text/css" href='main.css'>
-
Which of the following property is used to set the background color of an element
background-rgb
background-color
background-rgba
None of the above
-
Which Tag used to define an internal style?
<style>
<link>
<script>
-
Which extension is used to save a css file?
.cs
.style
.css
.design
-
Which selector is used to select multiple elements in css?
Class selector
Attribute Selector
Element Selector
all of the above
-
Which selector is used to add style for an unique element in css?
Class selector
ID Selector
Element Selector
None of the above
-
Which property is used to set the text color?
color
text-color
color-text
font-color
-
Which of the following is used to color value in CSS?
Hexadecimal Value
rgb()
color name
all of the above
-
Which of the following is used to set the subscript of text using CSS?
hrizontal-align:sub
vertical-align:sub
hrizontal-align:subscript
vertical-align:subscript
-
Which of the following is the correct syntax to select all span elements in a div element?
span
div span
div+span
div::span
-
Which of the following CSS property is used to add underline to the text?
text-decoration
text-transform
text-indent
-
Which property is used to specify the transparency of an element
overflow
float
clear
opacity
-
The correct syntax to set a double border
border-style:double;
border-width:double;
border-format:double;
None of the Above
-
The correct syntax to set a bold text
font-weight:bold;
font-weight:600;
font-weight:900;
All of the Above
-
Which attribute is used for Inline styles
css
style
src
inline
-
Who invented CSS?
Hakon Wium Lie
Sergey Brin
Rasmus Lerdorf
Brendan Eich
-
Which of the following tag is used to embed css in html page?
<css>
<!DOCTYPE html>
<script>
<style>
-
In CSS, what does h1 can be called as
Attribute
Selector
Tag
Value
-
Which of the following CSS framework is used to create a responsive design?
django
rails
larawell
bootstrap
-
Which of the following are the CSS Extension Prefixes for Webkit?
-chrome
-web
-o-
-webkit
-
Which of the following is not a value for the font-style property?
oblique
normal
italic
none of the above
-
Which of the following function defines a linear gradient as a CSS image?
gradient()
linear-gradient()
grayscale()
image()
-
Which of the following is the correct way to apply CSS Styles?
in an external CSS file
inside an HTML element
inside the <head> section of an HTML page
all of the above
-
Which is not the property of the CSS box model?
margin
color
width
height
-
Which of the following CSS property sets the amount of spacing between letters?
line-height
letter-space
space
letter-spacing
-
Which of the following CSS property sets what kind of line decorations are added to an element, such as underlines, overlines, etc?
text-decoration
text-style
decoration-line
text-line
-
Which of the following CSS property adds padding to the top of an element?
padding-top
padding-height
top
padding-left
-
Which of the following CSS property sets the shadow for a box element?
set-shadow
box-shadow
shadow
canvas-shadow
-
Which of the following CSS Property controls how an element is positioned?
static
position
fix
set
-
What is the CSS property equivalent for the attribute <center>?
color
margin
align
none
-
Which of the following property is used to align the text in a table?
text-align
align
text
none of the above
-
Which of the following CSS property sets the opacity level for an element?
transparent
opacity
transparency
all of the above
-
Which of the following CSS property defines the space between cells in a table?
border-spacing
border-style
border
none of the bove
-
Which of the following property is used as the shorthand property of margin properties?
margin-left
marign
margin-right
none of the above
-
Which of the following property defines the color for the bottom border of an element?
border-right-color
border-color-right
border-color
border-right
-
Which symbol is used to defined id selector?
* (astrik)
. (dot)
^ (exponent)
# (hash)
-
Which of the following values specifies the dotted border?
border-style:dot
border-style:dotted
border-dot
None of the above
-
From the given which one is correct?
font-thick:bold;
font:bold;
font-weight:bold;
font-weight:thin;
-
How you give solid value by using css property?
border-style
border-solid
border-thick
border-thin
-
Which of the following property controls the vertical overflow of a block or inline block?
overflow-y
overflow-x
overflow
overflow-none
-
Which of the following is not an appropriate value for overflow element?
hidden
auto
scroll
fixed
-
Which of the following property converts text to initial capitals, all uppercase, or all lowercase?
text-transform
text
text-decoration
text-uppercase
-
Which of the following is a value for font-style property?
size
italic
bold
none of the above
-
Which of the following Property controls the display of small caps?
font-size
font-variant
font-style
font-weight
-
Which css property you will use margin between a DIV's border and its inner text ?
Spacing
Space
inner-margin
Padding
-
If we want to wrap a block of text around an image, which css property will we use ?
wrap
push
float
align
-
How do you make a list that lists its items with squares?
list-type: square
type: square
type: 2
list-style-type: square
-
How do you make each word in a text start with a capital letter?
text-transform:capitalize
text-transform:uppercase
none of the above