-
Notifications
You must be signed in to change notification settings - Fork 0
HTML Quiz
What does HTML stand for?
- Hypertext Markup Language
- Home Tool Markup Language
- Hyperlinks and Text Markup Language
- Hyperlink Markup Language
Answer
1Which of the following is the correct basic structure of an HTML document?
-
<!DOCTYPE html> <html> <head> <title></title> <body> </body> </head> </html> -
<!DOCTYPE html> <html> <head> <title></title> </head> <body> </body> </html> -
<html> <head> <title></title> </head> <body> </body> </html> </DOCTYPE html> -
<html> <head> <title></title> <body> </body> </head> </html>
Answer
2Which tag is used for the largest heading?
-
<h1> -
<heading> -
<h6> -
<head>
Answer
1How do you create a hyperlink in HTML?
-
<a href="http://www.example.com">Example</a> -
<link url="http://www.example.com">Example</link> -
<a url="http://www.example.com">Example</a> -
<hyperlink src="http://www.example.com">Example</hyperlink>
Answer
1Which tag is used to display an image in HTML?
-
<img src="image.jpg" alt="description"> -
<image src="image.jpg" alt="description"> -
<picture src="image.jpg" alt="description"> -
<src img="image.jpg" alt="description">
Answer
1What is the correct HTML element for creating an unordered list?
-
<ul> -
<ol> -
<li> -
<list>
Answer
1How do you merge two table cells horizontally?
-
colspan -
rowspan -
merge -
cellspan
Answer
1Which attribute is used to define the URL where the form data will be sent?
-
action -
method -
url -
href
Answer
1Which HTML element is used to define important text?
-
<strong> -
<important> -
<i> -
<b>
Answer
1What is the purpose of the <header> element in HTML5?
- It defines a header for a document or section.
- It defines the topmost part of a webpage.
- It defines the heading of a table.
- It defines the header of an image.
Answer
1Which tag is used to embed a video in HTML?
-
<video> -
<media> -
<movie> -
<embed>
Answer
1What is the file extension for an HTML file?
-
.html -
.htm -
.css -
.web
Answer
1Which of these platforms offer free hosting for HTML sites?
- GitHub Pages
- Netlify
- Heroku
- All of the above
Answer
4Which HTML element is used for specifying metadata?
-
<meta> -
<metadata> -
<data> -
<info>
Answer
1Which of the following is a reliable resource for learning HTML?
- MDN Web Docs
- W3Schools
- Codecademy
- All of the above
Answer
4What does the <body> tag in HTML do?
- Contains the visible content of the webpage
- Contains meta information
- Defines the document type
- Links external resources
Answer
1How do you create a comment in HTML?
-
<!-- This is a comment --> -
// This is a comment -
/* This is a comment */ -
# This is a comment
Answer
1Which element is used to create a numbered list?
-
<ol> -
<ul> -
<li> -
<list>
Answer
1What attribute is used to provide alternative text for an image?
-
alt -
title -
src -
href
Answer
1Which element is used to create a dropdown list in a form?
-
<select> -
<option> -
<input> -
<dropdown>
Answer
1What does the <nav> element represent in HTML5?
- A section of navigation links
- The main content area
- The footer of a document
- An image gallery
Answer
1Which attribute specifies that an input field must be filled out before submitting a form?
-
required -
validate -
mandatory -
mustfill
Answer
1What is the purpose of the <footer> element in HTML5?
- It defines a footer for a document or section.
- It creates a fixed footer at the bottom of the page.
- It styles the footer text.
- It includes the closing tags for a document.
Answer
1Which HTML tag is used to define an internal style sheet?
-
<style> -
<css> -
<stylesheet> -
<link>
Answer
1How do you create a table in HTML?
-
<table> -
<tbl> -
<tr> -
<td>
Answer
1What does the target="_blank" attribute do when added to a hyperlink?
- Opens the link in a new tab or window
- Opens the link in the same tab
- Creates a blank hyperlink
- Removes the hyperlink
Answer
1Which tag is used to define an interactive field in an HTML form?
-
<input> -
<field> -
<interactive> -
<enter>
Answer
1What is the purpose of the <section> element in HTML5?
- It defines a section in a document.
- It creates a sidebar.
- It specifies a section of a table.
- It styles the text in a section.
Answer
1How do you add a background color to an HTML element?
- Using the
styleattribute - Using the
colorattribute - Using the
bgcolorattribute - Using the
backgroundattribute
Answer
1Which element is used to create a horizontal line in HTML?
-
<hr> -
<line> -
<horizontal> -
<break>
Answer
1Which attribute is used to uniquely identify an HTML element?
-
id -
class -
name -
identity
Answer
1How do you specify the character encoding for an HTML document?
-
<meta charset="UTF-8"> -
<meta encoding="UTF-8"> -
<meta type="UTF-8"> -
<meta content="UTF-8">
Answer
1Which HTML element is used to create a text area?
-
<textarea> -
<input type="textarea"> -
<textbox> -
<input type="textbox">
Answer
1What does the alt attribute provide for an image?
- Alternative text for accessibility
- The title of the image
- The source URL of the image
- The size of the image
Answer
1Which element is used to group block-elements to format them with CSS?
-
<div> -
<span> -
<group> -
<block>
Answer
1Which HTML element is used to group inline elements?
-
<span> -
<div> -
<group> -
<inline>
Answer
1What is the purpose of the <aside> element in HTML5?
- It defines content aside from the main content.
- It defines a sidebar.
- It specifies a section of a table.
- It styles the text in a section.
Answer
1Which attribute is used to specify that an input field is read-only?
-
readonly -
disabled -
readonly="true" -
locked
Answer
1Which HTML element is used to create a drop-down list?
-
<select> -
<dropdown> -
<list> -
<options>
Answer
1What does the rel="stylesheet" attribute specify when used in a <link> element?
- It specifies the relationship between the current document and the linked document.
- It specifies the relative path to the linked document.
- It specifies the release date of the linked document.
- It specifies the rendering behavior of the linked document.
Answer
1Which HTML element is used for specifying a table header?
-
<th> -
<thead> -
<header> -
<tr>
Answer
1What does the <caption> element do in a table?
- It adds a title or caption to the table.
- It creates a heading row.
- It adds a summary to the table.
- It creates a footer row.
Answer
1How do you specify the width and height of an image?
- Using the
widthandheightattributes - Using the
sizeattribute - Using the
dimensionattribute - Using the
img-sizeattribute
Answer
1Which element is used to define emphasized text?
-
<em> -
<i> -
<strong> -
<b>
Answer
1What does the <code> element represent?
- A piece of computer code
- The language of the document
- A special character
- The copyright information
Answer
1Which element is used to create a horizontal line?
-
<hr> -
<line> -
<break> -
<separator>
Answer
1How do you make text bold in HTML?
-
<b> -
<bold> -
<strong> -
<em>
Answer
1 or 3Which element is used to create a clickable button?
-
<button> -
<input type="button"> - Both
<button>and<input type="button"> -
<click>
Answer
3What does the <cite> element represent?
- A reference to a creative work
- A blockquote
- A citation number
- A site URL
Answer
1Which attribute specifies the number of rows a cell should span in a table?
-
rowspan -
colspan -
cellspan -
rows
Answer
1© @TechShade || 2024 || [See Video](https://www.youtube.com/watch?v=jB1QJxWteK0)