Trivia Quiz: How Much Do You Know About HTML And CSS?

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 Najlah
N
Najlah
Community Contributor
Quizzes Created: 2 | Total Attempts: 13,689
Questions: 31 | Attempts: 11,682

SettingsSettingsSettings
Trivia Quiz: How Much Do You Know About HTML And CSS? - Quiz

Cascading Style Sheets is a style sheet language used for describing the presentation of a document written in a markup language like HTML. Over the past week, we have been able to cover HTML and CSS in great detail and as promised there is a perfect quiz to test your understanding on the topic. So give it a try and see how well you understood them.


Questions and Answers
  • 1. 

    What does HTML stand for?

    • A.

      Hyper Text Markup Language

    • B.

      Home Tool Markup Language

    • C.

      Hyperlinks and Text Markup Language

    Correct Answer
    A. Hyper Text Markup Language
    Explanation
    HTML stands for Hyper Text Markup Language. It is a standard markup language used for creating web pages and applications. HTML uses tags to structure the content and define the layout of a web page. It is the foundation of the World Wide Web and is used to create the structure and appearance of websites.

    Rate this question:

  • 2. 

    Who is making the Web standards?

    • A.

      Mozilla

    • B.

      Microsoft

    • C.

      The World Wide Web Consortium

    Correct Answer
    C. The World Wide Web Consortium
    Explanation
    The World Wide Web Consortium (W3C) is responsible for making the Web standards. W3C is an international community that develops open standards to ensure the long-term growth of the Web. It consists of member organizations, including major technology companies, academic institutions, and individuals who collaborate to create and maintain these standards. The involvement of various stakeholders ensures that the standards are comprehensive, inclusive, and widely adopted, leading to a more consistent and interoperable Web experience for users across different platforms and devices.

    Rate this question:

  • 3. 

    Choose the correct HTML tag for the largest heading

    • A.

      Head

    • B.

      H1

    • C.

      H6

    • D.

      Heading

    Correct Answer
    B. H1
    Explanation
    The correct HTML tag for the largest heading is h1. This tag is used to define the most important heading on a webpage, typically the main title or heading. It is the largest and most prominent heading tag in HTML, with h2, h3, h4, h5, and h6 being progressively smaller headings. The "head" tag is used to define the head section of an HTML document, while "h6" is the smallest heading tag. "Heading" is not a valid HTML tag.

    Rate this question:

  • 4. 

    What is the correct HTML tag for inserting a line break?

    • A.

      Break /

    • B.

      Br /br

    • C.

      Lb /

    • D.

      <br>

    • E.

      Br/

    Correct Answer
    D. <br>
    Explanation
    The correct HTML tag for inserting a line break is "<br>". This tag is a self-closing tag, meaning it does not require a closing tag. It is used to create a line break or a new line within a paragraph or block of text.

    Rate this question:

  • 5. 

    Choose the correct HTML tag to make a text bold.  

    • A.

      bold

    • B.

      b

    • C.

      bb

    Correct Answer
    B. b
    Explanation
    The correct answer is "b". The "b" tag in HTML is used to make text bold.

    Rate this question:

  • 6. 

    Choose the correct HTML tag to make a text italic.  

    • A.

      Italic

    • B.

      I

    • C.

      It

    Correct Answer
    B. I
    Explanation
    The correct HTML tag to make a text italic is the "i" tag. This tag is used to apply italic formatting to the enclosed text.

    Rate this question:

  • 7. 

    What is the correct HTML for creating a hyperlink?

    • A.

      A url="http://www.w3schools.com">W3Schools.com

    • B.

      A href="http://www.w3schools.com">W3Schools

    • C.

      A>http://www.w3schools.com

    • D.

      A name="http://www.w3schools.com">W3Schools.com

    Correct Answer
    B. A href="http://www.w3schools.com">W3Schools
    Explanation
    The correct HTML for creating a hyperlink is "a href="http://www.w3schools.com">W3Schools". This code creates a hyperlink that links to the URL "http://www.w3schools.com" and displays the text "W3Schools" as the clickable link.

    Rate this question:

  • 8. 

    How can you create an e-mail link?  

    Correct Answer
    D. A href="mailto:[email protected]"
    Explanation
    To create an email link, you need to use the HTML anchor tag () with the href attribute set to "mailto:[email protected]". This tells the browser to open the default email client with a new message addressed to the specified email address ([email protected]) when the link is clicked.

    Rate this question:

  • 9. 

    How can you open a link in a new browser window?  

    • A.

      A href="url" target="_blank"

    • B.

      A href="url" new

    • C.

      A href="url" target="new"

    • D.

      A href="url" target=_window"

    Correct Answer
    A. A href="url" target="_blank"
    Explanation
    To open a link in a new browser window, you can use the "target" attribute with the value "_blank" in the anchor tag. This attribute specifies where to open the linked document, and "_blank" indicates that the link should be opened in a new window or tab. So, the correct answer is "a href="url" target="_blank"."

    Rate this question:

  • 10. 

    How can you make a list that lists the items with numbers?  

    • A.

      Ol

    • B.

      Dl

    • C.

      Ul

    • D.

      List

    Correct Answer
    A. Ol
    Explanation
    The correct answer is "ol". "ol" stands for ordered list, which is a type of list that lists items with numbers.

    Rate this question:

  • 11. 

    How can you make a list that lists the items with bullets?  

    • A.

      Dl

    • B.

      Ol

    • C.

      Ul

    • D.

      List

    Correct Answer
    C. Ul
    Explanation
    The correct answer is "ul" because "ul" stands for "unordered list" in HTML. An unordered list is a type of list that displays items with bullets.

    Rate this question:

  • 12. 

    What is the correct HTML for inserting an image?

    • A.

      Img alt="MyImage" image.gif /img

    • B.

      Image src="image.gif" alt="MyImage"

    • C.

      Img src="image.gif" alt="MyImage"

    • D.

      Img href="image.gif" alt="MyImage"

    Correct Answer
    C. Img src="image.gif" alt="MyImage"
    Explanation
    The correct HTML for inserting an image is "img src="image.gif" alt="MyImage"". This code includes the "img" tag, which is used to insert images in HTML, and the "src" attribute, which specifies the source or location of the image file. The "alt" attribute is used to provide alternative text for the image, which is displayed if the image cannot be loaded.

    Rate this question:

  • 13. 

    How can you make a list that lists the items without bullets or numbers?

    • A.

      Ol

    • B.

      Ul

    • C.

      Dl

    • D.

      Lists have to have numbers or bullets

    Correct Answer
    C. Dl
    Explanation
    The correct answer is "dl". The "dl" tag is used to create a definition list in HTML, which lists items without bullets or numbers. It consists of a series of terms (dt) and their corresponding definitions (dd). Unlike ordered (ol) and unordered (ul) lists, which use numbers and bullets respectively, the definition list does not have any visual markers.

    Rate this question:

  • 14. 

    What is the name of every homepage on the WWW?

    • A.

      Home.html

    • B.

      Index.html

    • C.

      Anything you want it to be.html

    • D.

      The name of your website.html

    Correct Answer
    B. Index.html
    Explanation
    The correct answer is "index.html" because "index.html" is a commonly used filename for the homepage of a website on the World Wide Web. It is a standard convention that many web servers and content management systems follow to designate the main page of a website as "index.html".

    Rate this question:

  • 15. 

    The is doctype mandatory.

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
    Explanation
    The doctype declaration is mandatory in HTML documents. It is used to specify the version of HTML being used and ensures that the document is rendered correctly by web browsers. Without the doctype declaration, the browser may enter "quirks mode" and interpret the HTML code differently, leading to inconsistent rendering across different browsers. Therefore, it is essential to include the doctype declaration at the beginning of an HTML document.

    Rate this question:

  • 16. 

    What does CSS stand for?

    • A.

      Creative Style Sheets

    • B.

      Colorful Style Sheets

    • C.

      Computer Style Sheets

    • D.

      Cascading Style Sheets

    Correct Answer
    D. Cascading Style Sheets
    Explanation
    CSS stands for Cascading Style Sheets. It is a style sheet language used for describing the look and formatting of a document written in HTML. CSS allows web designers to control the appearance of multiple web pages by applying styles to elements on the page. It provides a way to separate the presentation of a document from its structure, making it easier to maintain and update the design of a website.

    Rate this question:

  • 17. 

    What is the correct HTML for referring to an external style sheet?  

    • A.

      Stylesheetmystyle.css/stylesheet /

    • B.

      Link rel="stylesheet" type="text/css" href="mystyle.css"

    • C.

      Style src="mystyle.css" /

    Correct Answer
    B. Link rel="stylesheet" type="text/css" href="mystyle.css"
    Explanation
    The correct HTML for referring to an external style sheet is "link rel="stylesheet" type="text/css" href="mystyle.css"". This is because the "link" tag is used to define a link between a document and an external resource, in this case, a style sheet. The "rel" attribute specifies the relationship between the current document and the linked resource, and the "type" attribute specifies the type of the linked resource, which is "text/css" for a style sheet. Finally, the "href" attribute specifies the URL or file path of the linked resource, in this case, "mystyle.css".

    Rate this question:

  • 18. 

    Which is the correct CSS syntax?  

    • A.

      Body:color=black

    • B.

      {body;color:black}

    • C.

      {body:color=black(body}

    • D.

      Body {color: black}

    Correct Answer
    D. Body {color: black}
    Explanation
    The correct CSS syntax is "body {color: black}". In CSS, selectors are used to target specific HTML elements, and in this case, the "body" selector is used to target the body element. The curly braces {} are used to enclose the declaration block, which contains the property and value pairs. The property "color" is being set to the value "black" to change the text color of the body element.

    Rate this question:

  • 19. 

    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 //

    Correct Answer
    B. /* this is a comment */
    Explanation
    To insert a comment in a CSS file, you use the syntax /* comment */. This allows you to add notes or explanations within the CSS code without affecting the styling or functionality of the webpage. The other options mentioned, such as using // or ' to indicate a comment, are not valid in CSS.

    Rate this question:

  • 20. 

    Which property is used to change the background color?  

    • A.

      Bgcolor:

    • B.

      Background-color:

    • C.

      Color:

    Correct Answer
    B. Background-color:
    Explanation
    The property used to change the background color is "background-color". This property allows you to specify a color value that will be applied to the background of an element. By using this property, you can easily change the background color of a webpage or an element within it.

    Rate this question:

  • 21. 

    Which of the following CSS properties is used to change the text color of an HTML element?

    • A.

      Color

    • B.

      Text-size

    • C.

      Font-color

    • D.

      Text-style

    Correct Answer
    A. Color
    Explanation
    In CSS, the color property is used to set the color of the text content for an HTML element. This property can accept color names, hexadecimal color codes, RGB values, RGBA values, etc. The other options listed (font-color, text-color, and text-style) are not valid CSS properties.

    Rate this question:

  • 22. 

    How do you change the text color of an element?  

    • A.

      Color:

    • B.

      Text-color=

    • C.

      Text-color:

    • D.

      Fgcolor:

    Correct Answer
    A. Color:
    Explanation
    The correct answer is "color:". This CSS property is used to change the text color of an element. It allows you to specify a color value using keywords, hexadecimal codes, RGB values, or HSL values. By setting the "color" property to a desired color value, you can change the text color of an element on a webpage.

    Rate this question:

  • 23. 

    Which CSS property controls the text size?

    • A.

      Font-style

    • B.

      Text-style

    • C.

      text-size text-size

    • D.

      Font-size

    Correct Answer
    D. Font-size
    Explanation
    The CSS property that controls the text size is "font-size". This property allows you to specify the size of the text content within an element. By using different values such as pixels, percentages, or em units, you can adjust the text size to your desired preference.

    Rate this question:

  • 24. 

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

    • A.

      P { font-weight: bold; }

    • B.

      P style="text-size:bold"

    • C.

      P {text-size:bold}

    • D.

      P style="font-size:bold">

    Correct Answer
    A. P { font-weight: bold; }
    Explanation
    The correct CSS syntax for making all the
    elements bold is "p { font-weight: bold; }". The "font-weight: bold" property sets the font weight to bold, which makes the text appear thicker and darker.

    Rate this question:

  • 25. 

    How do you display hyperlinks without an underline?  

    • A.

      A {text-decoration:none}

    • B.

      A {text-decoration:no underline}

    • C.

      A {decoration:no underline}

    • D.

      A {underline:none}

    Correct Answer
    A. A {text-decoration:none}
    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 set the decoration of text, and the value "none" specifies that no decoration should be applied, including the underline.

    Rate this question:

  • 26. 

    How do you change the font of an element?  

    • A.

      Font-family:

    • B.

      F:

    • C.

      Font=

    Correct Answer
    A. Font-family:
    Explanation
    The font-family property is used to change the font of an element. It allows you to specify a list of fonts, in order of preference, that should be used for the text content of the element. The browser will use the first font in the list that it supports.

    Rate this question:

  • 27. 

    How do you make the text bold in CSS?  

    • A.

      Font-weight:bold

    • B.

      Style:bold

    • C.

      Font:b

    Correct Answer
    A. Font-weight:bold
    Explanation
    To make the text bold in CSS, you can use the "font-weight:bold" property. This property sets the weight, or thickness, of the font to bold.

    Rate this question:

  • 28. 

    How do you change the left margin of an element?

    • A.

      Margin-left:

    • B.

      Text-indent:

    • C.

      Margin:

    • D.

      Indent:

    Correct Answer
    A. Margin-left:
    Explanation
    To change the left margin of an element, you can use the CSS property "margin-left". This property allows you to specify the amount of space between the left edge of the element and its surrounding elements. By setting a value for "margin-left", you can adjust the position of the element horizontally within its container.

    Rate this question:

  • 29. 

    To define the space between the element's border and content, you use the padding property, you are allowed to use negative values?

    • A.

      True

    • B.

      False

    Correct Answer
    B. False
    Explanation
    The statement is false because you are not allowed to use negative values for the padding property. The padding property defines the space between an element's border and its content, and it is always a non-negative value. Using a negative value for padding would result in an invalid CSS declaration.

    Rate this question:

  • 30. 

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

    • A.

      Type: square

    • B.

      List-type: square

    • C.

      Type: 2

    • D.

      List-style-type: square

    Correct Answer
    D. List-style-type: square
    Explanation
    The correct answer is "list-style-type: square" because this CSS property sets the style of the bullet point or marker for each item in a list. By setting it to "square", the bullet points will be displayed as squares.

    Rate this question:

  • 31. 

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

    • A.

      In the head section

    • B.

      At the end of the document

    • C.

      At the top of the document

    • D.

      In the body section

    Correct Answer
    A. In the head section
    Explanation
    The correct place to refer to an external style sheet in an HTML document is in the head section. This is because the head section is used to define meta-information about the document, such as the title, character encoding, and external resources like style sheets. Placing the reference to the external style sheet in the head section ensures that it is loaded and applied before the content of the document is rendered, allowing for consistent and uniform styling throughout the entire page.

    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
  • Jun 17, 2024
    Quiz Edited by
    ProProfs Editorial Team
  • Dec 09, 2012
    Quiz Created by
    Najlah
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.