HTML Quiz: Questions With Answers

Reviewed by Godwin Iheuwa
Godwin Iheuwa, MS, Computer Science |
Computer Expert
Review Board Member
Godwin is a proficient Database Administrator currently employed at MTN Nigeria. He holds as MS in Computer Science from the University of Bedfordshire, where he specialized in Agile Methodologies and Database Administration. He also earned a Bachelor's degree in Computer Science from the University of Port Harcourt. With expertise in SQL Server Integration Services (SSIS) and SQL Server Management Studio, Godwin's knowledge and experience enhance the authority of our quizzes, ensuring accuracy and relevance in the realm of computer science.
, MS, Computer Science
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 Mpcoding
M
Mpcoding
Community Contributor
Quizzes Created: 1 | Total Attempts: 56,502
Questions: 15 | Attempts: 57,270

SettingsSettingsSettings
HTML Quiz: Questions With Answers - Quiz

Many programmers and web developers alike will agree that when deciding to enter the field of computing, learning one of the essential coding languages out there, HTML will give you a good starting point. In this HTML quiz, we’re going to put you on a test against a host of questions regarding the basics of the language, its protocols, and the correct layout. Good luck!


HTML Questions and Answers

  • 1. 

     What does HTML stand for?

    • A.

      HyperText Markup Language

    • B.

      HotMail

    • C.

      How to Make Lasagna

    Correct Answer
    A. HyperText Markup Language
    Explanation
    HTML stands for Hyper Text Markup Language. It is a standard markup language used for creating web pages and applications. It is the foundation of the World Wide Web and is used to structure the content and define the layout of a webpage. HTML uses tags to define elements such as headings, paragraphs, images, links, and more. It allows for the creation of hyperlinks, which enable users to navigate between different web pages. HTML is a crucial language for web development and is widely used by developers to create and design websites.

    Rate this question:

  • 2. 

     How many tags are in a regular HTML element?

    • A.

      2

    • B.

      1

    • C.

      3

    Correct Answer
    A. 2
    Explanation
    In a regular HTML element, there are typically two tags. The opening tag, which indicates the start of the element, and the closing tag, which indicates the end of the element. These tags are used to define and structure the content within the HTML element.

    Rate this question:

  • 3. 

    What is the difference between an opening tag and a closing tag?

    • A.

      Opening tag has a / in front.

    • B.

      Closing tag has a / in front.

    • C.

      There is no difference.

    Correct Answer
    B. Closing tag has a / in front.
    Explanation
    The explanation for the given correct answer is that a closing tag has a "/" in front. This is because closing tags are used to indicate the end of an element or a section of code, and the "/" symbol is used to signify the closing of that element. On the other hand, opening tags do not have a "/" in front as they are used to indicate the start of an element or a section of code.

    Rate this question:

  • 4. 

    < br  / > What type of tag is this?

    • A.

      Break tag

    • B.

      A broken one

    • C.

      An opening tag

    Correct Answer
    A. Break tag
    Explanation
    The "<br />" tag is used in HTML to create a line break in the text or content. It is a self-closing tag, indicating that it does not require a separate closing tag and is used to insert a line break without starting a new paragraph.

    Rate this question:

  • 5. 

    < body > Is this an opening tag or a closing tag of an HTML element?

    • A.

      Opening tag

    • B.

      Closing tag

    Correct Answer
    A. Opening tag
    Explanation
    The given correct answer is "opening tag" because the question asks whether the given tag is an opening tag or a closing tag. The HTML tag mentioned is, which is the opening tag for the body section of an HTML document. Opening tags are used to indicate the beginning of a specific element or section while closing tags are used to indicate the end of that element or section.

    Rate this question:

  • 6. 

    < / body > Is this an opening tag or a closing tag of an HTML element?

    • A.

      Opening tag

    • B.

      Closing tag

    Correct Answer
    B. Closing tag
    Explanation
    The given correct answer is "closing tag". This implies that the tag in question is a closing tag. In HTML, tags are used to define elements on a webpage. An opening tag is used to indicate the beginning of an element, while a closing tag is used to indicate the end of an element. Since the answer is "closing", it suggests that the tag mentioned in the question is a closing tag.

    Rate this question:

  • 7. 

     In which section or part of an HTML document is the meta tag typically located?

    • A.

      The last page

    • B.

      Any page

    • C.

      The second page

    Correct Answer
    B. Any page
    Explanation
    The given correct answer is "Any page". The meta tag can be included in the <head> section of any HTML page to provide metadata and information about the document. It is not restricted to a specific type of page within a website; it can be used on any page where it is relevant.

    Rate this question:

  • 8. 

     Which is the correct way to tag an image?

    • A.

      src=”image.jpg/gif” alt=”type some text”

    • B.

      Src=”image.jpg/gif” alt=type some text”

    • C.

      <img src="image.jpg/gif" alt="type some text">

    Correct Answer
    C. <img src="image.jpg/gif" alt="type some text">
    Explanation
    The correct way to tag an image is <img src="image.jpg/gif" alt="type some text"> 

     

    In HTML, the <img> element is used to embed images, and it should include the "src" attribute specifying the image file's source (URL or file path) and the "alt" attribute providing alternative text for the image. The format should be as shown above, where "image.jpg/gif" is the source and "type some text" is the alternative text.

    Rate this question:

  • 9. 

    What is the term for an HTML element that lacks a closing tag?

    • A.

      Tag

    • B.

      Empty element

    • C.

      Closed element

    Correct Answer
    B. Empty element
    Explanation
    An element that does not have a closing tag is called an empty element. This means that the element does not contain any content or nested elements within it. It is represented by a single tag without a closing tag, such as `<br>` for a line break or `<img>` for an image. These elements are self-closing and do not require a separate closing tag.

    Rate this question:

  • 10. 

     Which of the following is an example of an empty element in HTML?

    • A.

      < img / >

    • B.

      < img > < / img >

    • C.

      < / img>

    Correct Answer
    A. < img / >
    Explanation
    An empty element is an HTML element that doesn't require a closing tag. In this case, the correct answer is "< img / >", as it is a self-closing tag for an image element. The other options "< img > < / img >" and "< / img >" are not examples of empty elements because they have closing tags.

    Rate this question:

  • 11. 

     In HTML, how should values be consistently enclosed?

    • A.

      Quotation marks

    • B.

      Commas

    • C.

      Parenthesis

    Correct Answer
    A. Quotation marks
    Explanation
    In HTML, attribute values should be consistently enclosed within quotation marks, either single (' ') or double (" ") quotes. Although HTML5 allows for unquoted attribute values in some cases, it is considered best practice to always use quotation marks for consistency, readability, and to ensure compatibility with older browsers or different HTML parsers. Quotation marks help to clearly separate the attribute name from its value, making the code easier to understand and maintain.

    Rate this question:

  • 12. 

     Where do all items for the same website need to be saved?

    • A.

      In the same folder

    • B.

      Where ever is fine

    • C.

      In different folders

    Correct Answer
    A. In the same folder
    Explanation
    All items for the same website need to be saved in the same folder in order to maintain organization and ensure that all necessary files are easily accessible. Saving them in different folders would make it difficult to locate and manage the files effectively. By saving them in the same folder, it becomes convenient to keep track of all the website's components and make any necessary updates or modifications efficiently.

    Rate this question:

  • 13. 

     What does < a  h r e f = ”h t t p : / / w w w . g o o g l e . c o m“  t i t l e = ” L i n k  t o   G o o g l e  ” t a r g e t = ” _  b l a n k  ” > G o o g l e  < / a > do?

    • A.

      Adds a link to the word “Google” on the page

    • B.

      Adds a search engine to the page

    • C.

      Nothing

    Correct Answer
    A. Adds a link to the word “Google” on the page
    Explanation
    The given correct answer is "adds a link to the word “Google” on the page". This is because the HTML code Google creates a hyperlink to the Google website. The "href" attribute specifies the URL of the page to be linked, and the text "Google" is displayed as the clickable link on the page. The "target" attribute "_blank" opens the linked page in a new browser tab. Therefore, selecting this link would take the user to the Google website.

    Rate this question:

  • 14. 

     What is always a welcome page, and explains the purpose or topic of the site?

    • A.

      Page 4

    • B.

      Homepage

    • C.

      Table of contents

    Correct Answer
    B. Homepage
    Explanation
    The homepage is always a welcome page that explains the purpose or topic of the site. It is the first page that users see when they visit a website and it provides an overview of the content and navigation options available. The homepage typically includes important information about the site, such as its mission, key features, and links to other relevant pages. It serves as a guide for users to understand the purpose and navigate through the website effectively.

    Rate this question:

  • 15. 

    What does View Page Source(CTRL + U) do?

    • A.

      Nothing

    • B.

      Shows on the browser the HTML code used to create the website

    • C.

      Opens a new website.

    Correct Answer
    B. Shows on the browser the HTML code used to create the website
    Explanation
    View page source is a feature that can be accessed from a web browser by right clicking, and it lets users access/view the HTML and code of a webpage in the browser, enabling them to analyze, modify, or learn from the page's structure and content

    Rate this question:

Godwin Iheuwa |MS, Computer Science |
Computer Expert
Godwin is a proficient Database Administrator currently employed at MTN Nigeria. He holds as MS in Computer Science from the University of Bedfordshire, where he specialized in Agile Methodologies and Database Administration. He also earned a Bachelor's degree in Computer Science from the University of Port Harcourt. With expertise in SQL Server Integration Services (SSIS) and SQL Server Management Studio, Godwin's knowledge and experience enhance the authority of our quizzes, ensuring accuracy and relevance in the realm of computer science.

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 28, 2024
    Quiz Edited by
    ProProfs Editorial Team

    Expert Reviewed by
    Godwin Iheuwa
  • Jul 16, 2012
    Quiz Created by
    Mpcoding
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.