250+ TOP MCQs on Specifying Bullet Point Styles, CSS Image Alignment, ID and Class

CSS written test Questions & Answers on “Specifying Bullet Point Styles, CSS Image Alignment, ID and Class”.

1. Which of the following is not the value for an unordered list?
a) disc
b) square
c) circle
d) numeric
Answer: d

2. Which of the following value sits to the left of the block of text?
a) outside
b) left
c) inside
d) right

Answer: a
Clarification: List are indented into the page by default and list-style-position property indicates whether the marker should appear on inside or outside box containing main points. This property can take two values outside and inside. The marker sits to the left of the block of text, this is the default behavior if this property is not used.

3. ID selector name is preceded by __________
a) ‘.’
b) ‘%’
c) ‘#’
d) ‘@’

Answer: c

4. In which every block-level element appears on a new line?
a) normal flow
b) relative positioning
c) absolute positioning
d) floating positioning

Answer: a
Clarification: Every block-level element appears on a new line, which causes each item to appear lower down the page than the previous one. Even if we specify the width of the boxes and there is space for two elements to sit side by side, they will not appear next to each other.

5. Which of the following will take the element out of normal flow?
a) fixed positioning
b) floating elements
c) relative positioning
d) absolute positioning

Answer: b
Clarification: Floating an element allows us to take that element out of normal flow and position it too far left or right of a containing box. The floated element becomes block-level element around which other content can flow.

  250+ TOP MCQs on Miscellaneous and Answers

6. Which value clear property can’t take?
a) left
b) right
c) none
d) center

Answer: d
Clarification: The clear property allows us to say that no element within the same containing element should touch left or right hand sides of a box. It can take the values left, right, both or none. When set to none elements can touch either side.

7. Which of the property is not used for positioning columns next to each other?
a) float
b) width
c) margin
d) border

Answer: d
Clarification: Many web pages used multiple columns in their design. The three CSS properties are used to position columns next to each other. Width, margin, and float. Width sets the width of the column, float positions columns next to each other, margin creates a gap between columns.

8. Which of the following is not the value for background-repeat property?
a) repeat-y
b) repeat-x
c) no-repeat
d) fixed

Answer: d
Clarification: Background-repeat property can have four values i.e. repeat, repeat-x, repeat-y and no -repeat. The background image is repeated both horizontally and vertically by setting the value repeat, repeat-x repeats the image horizontally only.

9. Which of the following will move the image up and down?
a) scroll
b) fixed
c) repeat-x
d) repeat-y

Answer: a
Clarification: The background image moves up and down as the user scrolls up and down the page. The fixed value helps background image stays in the same position on the page.

10. Which should be used to overlay text on image with high contrast?
a) screen
b) high contrast
c) low contrast
d) opaque

  250+ TOP MCQs on Backgrounds, Borders and Drop Shadow and Answers

Answer: a
Clarification: To overlay text on an image with high contrast, we can place a semi-transparent background color or “screen” behind the text to improve legibility. The majority of photographs have quite high contrast, that means they are not ideal for use as background image.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top