HTML MCQ With Answers
HTML is an abbreviation for HyperText Markup Language. It is the standard go-to language to make web pages and is used to make the general structure of a website/webpage. HTML informs the web browser on how to display the content of the website when the user loads it. HTML consists of a series of elements, which label pieces of content as “heading”, “paragraph”, “link”, etc.
A standard HTML file is shown below:
<!DOCTYPE html>
<html>
<head>
<title>Title Page</title>
</head>
<body>
<h1>Heading Line</h1>
<p>Paragraph Lines</p>
</body>
</html>
From the above code, the components of an HTML file document is as explained below:
- <!DOCTYPE html> acts as a declaration that this document is an HTML5 document.
- <html> element is the root element of the HTML page.
- <head> element contains metadata for the HTML page.
- <title> tag produces a title for the webpage we are currently rendering(our HTML page).
- <body> defines the body of the document, and is basically a container for all the contents which is visible in the HTML page like hyperlinks, headings, titles, paragraphs, etc.
- <h1> tag is basically a heading. The ‘1’ represents the size of the heading, 1 being the largest and 6 being the smallest.
- <p> tag basically defines a paragraph.
The general syntax for an HTML element is defined by a start tag, an end tag, and some content enclosed within it. For some HTML elements, the end tag is not needed.
Important Links
- HTML Cheat Sheet
- HTML Interview Questions
- HTML Features
- HTML IDE
- HTML Books
- HTML vs XML
- HTML vs HTML5
- HTML vs XHTML
- HTML vs CSS
- HTML vs Javascript
HTML MCQs
Which of the following colors contain equal amounts of RBG?
What is the correct syntax to write an HTML comment?
What is the effect of the <b> tag?
What is the function of the HTML style attribute?
What is the select tag used for?
Learn via our Video Courses
What is the smallest header in HTML by default?
What is the speciality about the <small> and <big> tags in HTML?
What tag is used to render an image on a webpage?
Which attribute is used to provide a unique name to an HTML element?
Which HTML element is used to define description data?
Which HTML tag is called the root element of an HTML document?
Which HTML tag is used to set up a Javascript-like client-side scripting language?
Which of the following are examples of block-level elements in HTML?
What is meant by an empty tag in HTML?
Which of the following is correct about HTML?
Which of the following is the correct syntax for using the HTML style attribute?
Which of the following is true about HTML tags?
Which of the following properties is used to change the font of text?
Which of the following tags doesn’t require a closing tag?
Which of the following tags is used to add a row to a table in HTML?
Which of the following tags is used to indicate the page’s start and endpoints?
Which of the following things are necessary to create an HTML page?
Which property allows an image link to show a text label?
Which property is used to set border colors in HTML?
Which property is used to set colors in HTML?
The most basic part of any HTML page is?
Colors are defined in HTML using?
How are quotations defined in HTML?
How is black color represented in terms of RGB values?
How many characters can be written in 1KB?
How many sizes of headers are available in HTML by default?
How to create an ordered list in HTML?
How to display preformatted text in HTML?
How to set a font for a whole page?
HTML files are saved by default with the extension?
If a background image is smaller than the screen on which it is being displayed, what will occur on the webpage?
The CSS inside HTML elements used alongside style attribute is called?
The default value of the BORDER attribute is?
Apart from <i> tag, which of the following tag is used to render a text in italics?
We enclose HTML tags within?
What are some valid character sets available?
What are the attributes used to change the size of an image?
What are the main components of the front end of any working website?
What are the properties of block-level elements?
What are the types of lists available in HTML?
What are the types of unordered lists in HTML?
What are those objects called which are used for storing data on the client provided by the HTML local storage?
What does the abbreviation HTML stand for?
What does the Alpha value in RGBA represent?
What does the Alpha value of 0.0 represent?