This quiz contains basic HTML questions to start with. Giving the quiz helps in brushing up HTML concepts and its fun as well to analyze yourself before appearing for any real time test.
HTML Quiz 1
Congratulations! You've completed HTML Quiz 1. You scored %%SCORE%% out of %%TOTAL%%. Your performance has been rated as %%RATING%%
Your answers are highlighted below.
What is the basic difference, if any, between <div> & <span>:
< div > is a block-level element while < span > is an inline-level element .
< span > is a block-level element while < div > is an inline-level element .
Both are inline-block elements.
Question 1 Explanation:
Block-level element takes up the full available width. Inline-level element takes up as much width as necessary. Inline-block elements are like inline elements but they can have a width and height.
Which of the following has the correct HTML syntax:
< p style"font-size:10px;"> Welcome </ p >
< p style="font-size:10px;"> Welcome </ p >
< p style="font-size=10px;"> Welcome </ p >
< p style:"font-size:10px;"> Welcome </ p >
Question 2 Explanation:
The HTML style attribute has the following syntax: < tagname style="property:value;" >
Which of the following is the default positioning scheme:
Question 3 Explanation:
The default position is Static for any html element if not specified explicitly. static is always the initial value for the CSS property position no matter which tag.
HTML is abbreviated for:
Hyper Text Markup Language
Hyphenation Text Markup Language
High Tabular Markup Language
Hyper Tabular Markup Language
Question 4 Explanation:
Hypertext means machine readable text & Markup means to structure it in a specific format. So,HTML is called hypertext markup language because it is a language that allows users to organize, improve the appearance of, and link text with data on the internet.
Which of the following is NOT a self-closing tag:
< br />
< div />
< img />
< input />
Question 5 Explanation:
Self-closing tags on non-void elements like < div />, < p /> do not work at all.
Which of the following is a way to hide an element:
All of the above
Question 6 Explanation:
display:none : occupies no space, ignored while rendering (acts like if element is not there at all) opacity:0 : occupies space, you don't see it but you can not click on elements behind it. visibility:hidden :occupies space and you can click on element behind it.
Which of the following is a newly introduced tag of HTML5:
< section >
< article >
< aside >
< nav >
All of these
Question 7 Explanation:
< article > - Defines an article in the document < aside > - Defines content aside from the page content like sidebar. < nav > - Defines navigation links in the document < section > - Defines a section in the document
Which of the following defines the most important heading:
< header >
< h1 >
< h6 >
< heading >
Question 8 Explanation:
< h1 > defines the most important heading & < h6 > defines the least important heading. < heading > tag does not exist. < header > element is usually at the top of every page and contains a logo & information about what a site is about.
Once you are finished, click the button below. Any items you have not completed will be marked incorrect. Get Results
There are 8 questions to complete.
Shaded items are complete.
You have completed
Your score is
You have not finished your quiz. If you leave this page, your progress will be lost.
Final Score on Quiz
Attempted Questions Correct
Attempted Questions Wrong
Questions Not Attempted
Total Questions on Quiz
Answer Choice(s) Selected
Need more practice!
- Click to share on Facebook (Opens in new window)
- Click to share on Google+ (Opens in new window)
- Click to share on Twitter (Opens in new window)
- Click to share on WhatsApp (Opens in new window)
- Click to email this to a friend (Opens in new window)
- Click to print (Opens in new window)
- Share on Skype (Opens in new window)