HTML & CSS Quiz 2019

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 Punit.gupta
P
Punit.gupta
Community Contributor
Quizzes Created: 2 | Total Attempts: 1,041
Questions: 31 | Attempts: 230

SettingsSettingsSettings
HTML Quizzes & Trivia

.


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 and appearance of the web page. It allows for the creation of hyperlinks, which enable users to navigate between different pages or sections within a webpage. HTML is the foundation of the World Wide Web and is widely used for creating and designing websites.

    Rate this question:

  • 2. 

    Which of the following is used increase the row height?  

    • A.

      Cellspacing

    • B.

      Cellpadding

    • C.

      The World Wide Web Consortium

    • D.

      Col span

    Correct Answer
    C. The World Wide Web Consortium
  • 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 carries the highest level of importance and is displayed as the largest and most prominent heading on the page.

    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 . This tag is a self-closing tag, which means 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 HTML tag to make a text bold is the "b" tag. This tag is used to apply bold formatting to the text enclosed within it.

    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 tag.

    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 is because the "a" element is used to create a hyperlink, and the "href" attribute specifies the URL that the hyperlink should point to. In this case, the URL is "http://www.w3schools.com", and the text that will be displayed as the hyperlink is "W3Schools".

    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 can use the "a" tag with the "href" attribute set to "mailto:[email protected]". This will allow users to click on the link and open their default email client with a new message addressed to "[email protected]".

    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". This attribute specifies where to open the linked document, and "_blank" indicates that it should be opened in a new window or tab. Therefore, 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". This is because the "ol" tag in HTML is used to create an ordered list, where each item is listed 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
    To make a list that lists items with bullets, you can use the "ul" tag in HTML. The "ul" stands for unordered list, and it creates a list where each item is preceded by a bullet point. This type of list is commonly used when the order of the items is not important. The other options mentioned - dl, ol, and list - are not correct because they do not specifically refer to creating a list 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 specifies the image source file as "image.gif" and provides an alternative text description for the image as "MyImage".

    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" because it stands for "definition list" which is a type of HTML list that does not use bullets or numbers. Instead, it consists of a series of terms and their corresponding definitions.

    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 it is a commonly used default name for the homepage of a website on the World Wide Web. When a user visits a website without specifying a specific page, the server will typically look for an "index.html" file to display as the default homepage. This convention allows for consistency and ease of navigation for users.

    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 to ensure that the web browser renders the page correctly. Without a doctype declaration, the browser may interpret the code in a different way, leading to inconsistent rendering across different browsers. Therefore, it is important to include the doctype declaration at the beginning of an HTML document to ensure proper rendering and compatibility.

    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 presentation of a document written in HTML or XML. CSS allows web developers to control the layout, formatting, and appearance of multiple web pages at once. It provides a way to separate the content of a web page from its design and allows for easy maintenance and consistency across 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 the "link rel="stylesheet" type="text/css" href="mystyle.css"" code. This code uses the link element with the rel attribute set to "stylesheet" to indicate that it is a style sheet. The type attribute is set to "text/css" to specify the type of the style sheet. Finally, the href attribute is used to specify the location of the external style sheet file, 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}". This is the correct way to declare CSS styles for the "body" element, where "color" is the property and "black" is the value. The opening and closing curly braces are used to enclose the declaration block.

    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
    In CSS, comments are inserted using the syntax /* comment */. This allows developers to add notes or explanations within the CSS code without affecting the styling. The given answer correctly demonstrates the syntax for inserting a comment in a CSS file.

    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 the color of the background of an element on a webpage. By using the "background-color" property followed by a color value, you can easily change the background color to your desired choice.

    Rate this question:

  • 21. 

    How do you add a background color for all elements?  

    • A.

      H1 {background-color:#FFFFFF}

    • B.

      H1.all {background-color:#FFFFFF}

    • C.

      All.h1 {background-color:#FFFFFF}

    Correct Answer
    A. H1 {background-color:#FFFFFF}
    Explanation
    To add a background color for all elements, you would use the CSS selector "h1" followed by the property "background-color" and the desired color value. In this case, the color value is "#FFFFFF" which represents white. This CSS rule will apply the white background color to all elements on the webpage.

    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 is the correct CSS property to change the text color of an element. The other options mentioned in the question ("text-color=", "text-color:", and "fgcolor:") are incorrect and do not exist in CSS.

    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 "font-size" controls the size of the text. It allows you to specify the desired size of the font in pixels, percentages, em units, or other units of measurement. By adjusting the value of this property, you can make the text appear larger or smaller on the webpage.

    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}". This CSS rule targets all elements and sets the font-weight property to bold, which makes the text appear in bold. The other options provided in the question are incorrect.

    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 specify the decoration added to text, and setting it to "none" removes any decoration, 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 in CSS. By specifying a font name or a list of font names, the browser will attempt to display the text using the first available font in the list. This property allows designers to choose from a variety of fonts to style their web pages and create the desired visual effect.

    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, making it appear bold. It is the correct way to apply bold styling to text in CSS.

    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
    The correct answer is "margin-left:". This CSS property is used to change the left margin of an element. By specifying a value for margin-left, you can create space between the left edge of the element and its surrounding elements.

    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 padding property is used to define the space between an element's border and its content. Negative values are not allowed for the padding property. Padding values must be non-negative, meaning they cannot be negative.

    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 the CSS property "list-style-type" is used to define the style of the marker for list items. By setting it to "square", the list items will be displayed with square markers instead of the default bullet points.

    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 typically used to define meta information and include external resources such as stylesheets. Placing the reference to the external style sheet in the head section ensures that the styles are loaded before the content of the document, allowing for proper styling and presentation of the HTML elements.

    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
  • Feb 07, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Feb 07, 2019
    Quiz Created by
    Punit.gupta
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.