CSS Quiz - 1

Description: CSS Quiz - 1
Number of Questions: 13
Created by:
Tags: css
Attempted 0/13 Correct 0 Score 0
css
  1. Creative Style Sheets

  2. Computer Style Sheets

  3. Cascading Style Sheets

  4. Cascade Style Sheets

  5. Colorful Style Sheets


Correct Option: C

Where in an HTML document is the correct place to refer to an external style sheet?

css
  1. In the section

  2. At the end of the document

  3. At the top of the document

  4. In the section

  5. Between head and body


Correct Option: D

Which HTML tag is used to define an internal style sheet?

css
  1. css

  2. text/style

  3. style

  4. script


Correct Option: C
css
  1. font

  2. styles

  3. css

  4. text

  5. style


Correct Option: E
css
  1. body {color: black}

  2. body:color=black

  3. {body:color=black(body}

  4. {body;color:black}


Correct Option: A
css
  1. /* this is a comment */

  2. ' this is a comment

  3. // this is a comment //

  4. // this is a comment


Correct Option: A
Explanation:

To insert a comment in a CSS (Cascading Style Sheets) file, you can use the following syntax:

A. /* this is a comment */

This option is correct. In CSS, you can insert comments using the /* / syntax. Anything between the opening / and closing */ will be treated as a comment and will not affect the actual styling of the elements on the page.

B. ' this is a comment

This option is incorrect. In CSS, using single quotes (' ') is not the correct syntax for comments. It may cause an error if used in this way.

C. // this is a comment //

This option is incorrect. In CSS, the double forward slash (//) is not the correct syntax for comments. It is used in some programming languages like JavaScript, but not in CSS.

D. // this is a comment

This option is incorrect. As mentioned earlier, the double forward slash (//) is not the correct syntax for comments in CSS.

So, the correct answer is A. /* this is a comment */

Using this syntax, you can insert comments in your CSS file to provide explanations or notes for yourself or other developers working on the code.

css
  1. bgcolor:

  2. background-color:

  3. color:


Correct Option: B

How do you add a background color for all "

" elements?

css
  1. all.h1 {background-color:#FFFFFF}

  2. h1.all {background-color:#FFFFFF}

  3. h1 {background-color:#FFFFFF}


Correct Option: C
css
  1. text-color:

  2. color:

  3. text-color=

  4. font-color:


Correct Option: B

Which CSS property controls the text size?

css
  1. font-style

  2. text-style

  3. font-size

  4. text-size


Correct Option: C

How do you make each word in a text start with a capital letter?

css
  1. text-transform:capitalize

  2. ext-transform:uppercase

  3. You can't do that with CSS


Correct Option: B

How do you change the left margin of an element?

css
  1. left-margin:

  2. margin:

  3. margin-left:

  4. text-indent:


Correct Option: C

What are the three methods for using style sheets with a web page

css
  1. Dreamweaver, GoLive or FrontPage

  2. Inline, embedded or document level and external

  3. Handcoded, Generated or WYSIWYG


Correct Option: B
- Hide questions