CSS 3

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By Haxor Cefee
H
Haxor Cefee
Community Contributor
Quizzes Created: 2 | Total Attempts: 3,378
Questions: 15 | Attempts: 546

SettingsSettingsSettings
CSS Quizzes & Trivia

This is the quiz generated for CSS.


Questions and Answers
  • 1. 

    What does CSS stand for?

    • A.

      Computer Style Sheets

    • B.

      Cascading Style Sheets

    • C.

      Creative Style Sheets

    • D.

      Control Style Sheets

    Correct Answer
    B. Cascading Style Sheets
    Explanation
    CSS stands for Cascading Style Sheets. This is a stylesheet language used to describe the presentation of a document written in HTML or XML. It is responsible for the visual appearance of web pages, including layout, colors, fonts, and other design elements. The term "cascading" refers to the way styles are applied to different elements, with the ability to inherit and override styles from multiple sources. This allows for consistent and efficient styling across a website or web application.

    Rate this question:

  • 2. 

    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

    Correct Answer
    A. Yes
    Explanation
    Yes, you are allowed to use negative values for the padding property. Using negative padding values will cause the content to extend beyond the element's borders, effectively overlapping other elements. This can be useful in certain scenarios, such as when you want to create a visual effect or adjust the positioning of elements. However, it is generally recommended to use positive padding values for better readability and maintainability of the code.

    Rate this question:

  • 3. 

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

    • A.

      At the top of the document

    • B.

      In the section

    • C.

      At the end of the document

    • D.

      In the section

    Correct Answer
    D. In the section
    Explanation
    The correct place to refer to an external style sheet in an HTML document is in the section. This is where the document's metadata and other important information, such as the title and character encoding, is typically placed. Including the link to the external style sheet in the section ensures that the styles are loaded and applied before the content of the document is rendered, resulting in a more consistent and visually appealing presentation of the webpage.

    Rate this question:

  • 4. 

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

    • A.

      Style

    • B.

      Css

    • C.

      Script

    Correct Answer
    A. Style
    Explanation
    The HTML tag used to define an internal style sheet is the "style" tag. This tag is placed within the head section of an HTML document and is used to define CSS rules that will be applied to the elements within the document. By using the "style" tag, developers can easily apply styles to multiple elements without the need for an external CSS file.

    Rate this question:

  • 5. 

    Which HTML attribute is used to define inline styles?

    • A.

      Styles

    • B.

      Style

    • C.

      Font

    • D.

      Class

    Correct Answer
    C. Font
    Explanation
    The correct answer is "font". The font attribute in HTML is used to define inline styles. It allows you to specify the font size, color, and other font-related properties for a specific element within the HTML code. By using the font attribute, you can apply inline styles directly to an element without the need for external CSS or style sheets.

    Rate this question:

  • 6. 

    Which is the correct CSS syntax?

    • A.

      {body:color=black(body}

    • B.

      {body;color:black}

    • C.

      Body:color=black

    • D.

      Body {color: black}

    Correct Answer
    A. {body:color=black(body}
    Explanation
    The correct CSS syntax is "body {color: black}". In CSS, selectors are used to target specific elements on a webpage, and in this case, the selector "body" is used to target the body element. The curly brackets {} are used to enclose the declaration block, and within the declaration block, the property "color" is set to the value "black". This syntax correctly applies the CSS style of setting the text color of the body element to black.

    Rate this question:

  • 7. 

    How do you insert a comment in a CSS file?

    • A.

      *this is a comment ' this is a comment

    • B.

      /*this is a comment*/ /*this is a comment*/

    • C.

      //this is a comment// /this is a comment

    • D.

      /this is a comment // this is a comment

    Correct Answer
    B. /*this is a comment*/ /*this is a comment*/
    Explanation
    To insert a comment in a CSS file, you can use the syntax /* this is a comment */. This allows you to add notes or explanations within the CSS code that will not be interpreted by the browser.

    Rate this question:

  • 8. 

    Which property is used to change the background color?

    • A.

      Color:

    • B.

      Bgcolor:

    • C.

      Background-color:

    Correct Answer
    C. Background-color:
    Explanation
    The correct answer is "background-color:". This property is used to change the background color of an element on a webpage. It allows you to specify a color value, such as a color name, hexadecimal code, or RGB value, to be used as the background color for the selected element. By using the "background-color:" property, you can easily customize the appearance of the background of an element to match your desired design or style.

    Rate this question:

  • 9. 

    How do you add a background color for all elements?

    • A.

      All.h1 {background-color:#FFFFFF}

    • B.

      H1.all {background-color:#FFFFFF}

    • C.

      H1 {background-color:#FFFFFF}

    Correct Answer
    C. H1 {background-color:#FFFFFF}
    Explanation
    The correct answer is h1 {background-color:#FFFFFF}. This CSS rule targets all h1 elements and sets their background color to white (#FFFFFF).

    Rate this question:

  • 10. 

    How do you change the text color of an element?

    • A.

      Color:

    • B.

      Fgcolor:

    • C.

      Text-color:

    • D.

      Text-color=

    Correct Answer
    B. Fgcolor:
    Explanation
    The correct answer is "fgcolor:". In CSS, the "color" property is used to change the text color of an element. The "fgcolor:" option is not a valid CSS property.

    Rate this question:

  • 11. 

    Which CSS property controls the text size?

    • A.

      Text-size

    • B.

      Text-color

    • C.

      Front-size

    • D.

      Font-style

    Correct Answer
    C. Front-size
    Explanation
    The correct answer is "font-size". This CSS property is used to control the size of the text displayed on a webpage. It allows the web developer to specify the size of the font in pixels, ems, or other units of measurement. By adjusting the font-size property, the text can be made larger or smaller to enhance readability or achieve a desired aesthetic effect.

    Rate this question:

  • 12. 

    What is the correct CSS syntax for making all the elements bold?

    • A.

    • B.

    • C.

      P {text-size:bold}

    • D.

      P {font-weight:bold}

    Correct Answer
    D. P {font-weight:bold}
    Explanation
    The correct CSS syntax for making all the elements bold is "p {font-weight:bold}". In CSS, the "font-weight" property is used to specify the weight or thickness of the font. The value "bold" makes the text bold. Therefore, applying this style to the elements will make the text inside them appear bold.

    Rate this question:

  • 13. 

    How do you display hyperlinks without an underline?

    • A.

      A {underline:none}

    • B.

      A {text-decoration:none}

    • C.

      A {decoration:no underline}

    • D.

      a {text-decoration:no underline}

    Correct Answer
    D. a {text-decoration:no underline}
    Explanation
    The correct answer is "a {text-decoration:none}". This CSS code is used to remove the underline from hyperlinks. The "text-decoration" property is used to control the decoration of text, and setting it to "none" removes any underline that is applied to the hyperlink.

    Rate this question:

  • 14. 

    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:20px 10px 5px 1px

    • C.

      Border-width:5px 20px 10px 1px

    • D.

      Border-width:10px 20px 1px 5px

    Correct Answer
    A. Border-width:10px 20px 5px 1px
    Explanation
    The CSS property "border-width" is used to set the width of the border. The values are specified in clockwise order starting from the top border and going around to the right, bottom, and left borders. In this case, the top border is set to 10 pixels, the right border is set to 20 pixels, the bottom border is set to 5 pixels, and the left border is set to 1 pixel.

    Rate this question:

  • 15. 

    How do you make a list that lists its items with squares?

    • A.

      Type: 2

    • B.

      List-type: square

    • C.

      List-style-type: square

    • D.

      Type:square

    Correct Answer
    D. Type:square
    Explanation
    To make a list that lists its items with squares, you can use the CSS property "list-style-type: square". This property sets the marker for each list item to be a square shape. By applying this style to the list, each item will be displayed with a square marker.

    Rate this question:

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 21, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Dec 14, 2015
    Quiz Created by
    Haxor Cefee
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.