Practice
Resources
Contests
Online IDE
New
Free Mock
Events New Scaler
Practice
Improve your coding skills with our resources
Contests
Compete in popular contests with top coders
logo
Events
Attend free live masterclass hosted by top tech professionals
New
Scaler
Explore Offerings by SCALER
/ Interview Guides / HTML MCQ With Answers

HTML MCQ With Answers

Last Updated: Jan 08, 2024
Certificate included
About the Speaker
What will you Learn?
Register Now

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 MCQs

1. 

Which of the following colors contain equal amounts of RBG?

Create a free personalised study plan Create a FREE custom study plan
Get into your dream companies with expert guidance
Get into your dream companies with expert..
Real-Life Problems
Prep for Target Roles
Custom Plan Duration
Flexible Plans
2. 

What is the correct syntax to write an HTML comment?

3. 

What is the effect of the <b> tag?

4. 

What is the function of the HTML style attribute?

5. 

What is the select tag used for?

Learn via our Video Courses

6. 

What is the smallest header in HTML by default?

7. 

What is the speciality about the <small> and <big> tags in HTML?

Advance your career with   Mock Assessments Refine your coding skills with Mock Assessments
Real-world coding challenges for top company interviews
Real-world coding challenges for top companies
Real-Life Problems
Detailed reports
8. 

What tag is used to render an image on a webpage?

9. 

Which attribute is used to provide a unique name to an HTML element?

10. 

Which HTML element is used to define description data?

11. 

Which HTML tag is called the root element of an HTML document?

12. 

Which HTML tag is used to set up a Javascript-like client-side scripting language?

13. 

Which of the following are examples of block-level elements in HTML?

14. 

What is meant by an empty tag in HTML?

15. 

Which of the following is correct about HTML?

16. 

Which of the following is the correct syntax for using the HTML style attribute?

17. 

Which of the following is true about HTML tags?

18. 

Which of the following properties is used to change the font of text?

19. 

Which of the following tags doesn’t require a closing tag?

20. 

Which of the following tags is used to add a row to a table in HTML?

21. 

Which of the following tags is used to indicate the page’s start and endpoints?

22. 

Which of the following things are necessary to create an HTML page?

24. 

Which property is used to set border colors in HTML?

25. 

Which property is used to set colors in HTML?

26. 

The most basic part of any HTML page is?

27. 

Colors are defined in HTML using?

28. 

How are quotations defined in HTML?

29. 

How is black color represented in terms of RGB values?

30. 

How many characters can be written in 1KB?

31. 

How many sizes of headers are available in HTML by default?

32. 

How to create an ordered list in HTML?

33. 

How to display preformatted text in HTML?

34. 

How to set a font for a whole page?

35. 

HTML files are saved by default with the extension?

36. 

If a background image is smaller than the screen on which it is being displayed, what will occur on the webpage?

37. 

The CSS inside HTML elements used alongside style attribute is called?

38. 

The default value of the BORDER attribute is?

39. 

Apart from <i> tag, which of the following tag is used to render a text in italics?

40. 

We enclose HTML tags within?

41. 

What are some valid character sets available?

42. 

What are the attributes used to change the size of an image?

43. 

What are the main components of the front end of any working website?

44. 

What are the properties of block-level elements?

45. 

What are the types of lists available in HTML?

46. 

What are the types of unordered lists in HTML?

47. 

What are those objects called which are used for storing data on the client provided by the HTML local storage?

48. 

What does the abbreviation HTML stand for?

49. 

What does the Alpha value in RGBA represent?

50. 

What does the Alpha value of 0.0 represent?

Excel at your interview with Masterclasses Know More
Certificate included
What will you Learn?
Free Mock Assessment
Fill up the details for personalised experience.
Phone Number *
OTP will be sent to this number for verification
+1 *
+1
Change Number
Graduation Year *
Graduation Year *
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
*Enter the expected year of graduation if you're student
Current Employer
Company Name
College you graduated from
College/University Name
Job Title
Job Title
Engineering Leadership
Software Development Engineer (Backend)
Software Development Engineer (Frontend)
Software Development Engineer (Full Stack)
Data Scientist
Android Engineer
iOS Engineer
Devops Engineer
Support Engineer
Research Engineer
Engineering Intern
QA Engineer
Co-founder
SDET
Product Manager
Product Designer
Backend Architect
Program Manager
Release Engineer
Security Leadership
Database Administrator
Data Analyst
Data Engineer
Non Coder
Other
Please verify your phone number
Edit
Resend OTP
By clicking on Start Test, I agree to be contacted by Scaler in the future.
Already have an account? Log in
Free Mock Assessment
Instructions from Interviewbit
Start Test