Sample questions
Question 1Medium
Choose the correct HTML tag for the smallest size heading?
- <heading>
- <head>
- <h6>
- <h1>
Answer: C. <h6>
Explanation
HTML has six heading tags, <h1> to <h6>. <h1> is the largest and <h6> the smallest.
Step-by-step solution
- HTML has six heading tags, from h1 to h6.
- H1 is the largest heading and h6 is the smallest.
- So the smallest heading tag is h6, the correct answer 2.
Why the other options are wrong
- A. Heading is not an HTML tag.
- B. Head is for document information, not a heading.
- D. H1 is the largest heading, not the smallest.
Tip: Remember h1 is biggest and h6 is smallest.
Question 2Medium
Which of the following is not pair tag?
- <p>
- <u>
- <i>
- <img>
Answer: D. <img>
Explanation
<img> tag is used to attach image to html document. It's not text oriented ITS (Internationalization Tag Set)
like attachment, that's why it's not pair tag
Step-by-step solution
- A pair tag has an opening tag and a closing tag, such as p and /p.
- The p, u and i tags all have closing tags.
- The img tag is a single tag with no closing tag.
- So the answer is img, option D.
Why the other options are wrong
- A. P has a closing tag, so it is a pair tag.
- B. U has a closing tag, so it is a pair tag.
- C. I has a closing tag, so it is a pair tag.
Tip: Empty tags such as img, br and hr have no closing tag.
Question 3Medium
Which of the following is an attribute of the <table> tag?
- src
- Cell padding
- Link
- Bold
Answer: B. Cell padding
Explanation
cellpadding is an attribute of the table tag. It sets the space between the cell wall and the cell content. The other options are not table attributes.
Step-by-step solution
- Src is an attribute of tags like img, not of the table tag.
- Cell padding is an attribute of the table tag, written as cellpadding.
- So Cell padding (option B) is the attribute of table, as the correct answer says.
Why the other options are wrong
- A. Src belongs to tags such as img, not to table.
- C. Link is not an attribute of the table tag.
- D. Bold is a text tag name, not an attribute of table.
Tip: To check an attribute, look at the list of attributes for that tag.
Question 4Medium
What is difference between HTML<meta> tag and XHTML <meta> tag?
- In HTML the <meta> tag has no end tag. In XHTML the <meta> tag must be properly closed.
- In XHTML the <meta> tag has no end tag. In HTML the <meta> tag must be properly closed.
- Both are same.
- None of the above.
Answer: A. In HTML the <meta> tag has no end tag. In XHTML the <meta> tag must be properly closed.
Explanation
XHTML follows XML rules, so every element must be closed (<meta ... />). In HTML <meta> is a void element with no end tag.
Step-by-step solution
- In HTML, the meta tag is a void element and has no end tag.
- XHTML follows XML rules, so every element must be closed.
- So in XHTML the meta tag must be written as a self-closing tag.
- The correct answer is option A, which states exactly this difference.
Why the other options are wrong
- B. This reverses the two cases: XHTML must close meta, and HTML has no end tag for it.
- C. The two differ in closing rules, so they are not the same.
- D. Option A is correct, so none of the above is wrong.
Tip: XHTML needs every tag closed, including void tags like meta, img and br, written with a slash before the end.
Question 5Medium
Which tag is used to display the large font size?
- <LARGE></LARGE>
- <SIZE></SIZE>
- <BIG></BIG>
- <HUGE></HUGE>
Answer: C. <BIG></BIG>
Explanation
<BIG></BIG> showed text one size larger. It is obsolete in HTML5, where CSS font-size is used instead.
Step-by-step solution
- The tag that shows text one size larger is big.
- Option A, LARGE, and option D, HUGE, are not HTML tags.
- Option B, SIZE, is not a text-size tag.
- So the correct answer is option C, the big tag.
Why the other options are wrong
- A. LARGE is not a valid HTML tag.
- B. SIZE is not a valid HTML tag for text size.
- D. HUGE is not a valid HTML tag.
Tip: The big tag is old. In HTML5 use CSS font-size to change text size.
Question 6Medium
Meta tag comes under which tag?
- Header
- footer
- body
- None of the above
Answer: A. Header
Explanation
The general sequence of html tag is
<html><br><head><br><meta name="description" content="Free Web tutorials"><br></head><br><body></body>
</html>
Meta elements are typically used to specify page description, keywords, author of the document, last modified, and other metadata.
Step-by-step solution
- A meta element gives page details such as description, keywords and author.
- In a standard HTML page, meta sits inside the head element.
- The head is the header part of the page.
- So the answer is Header, option A.
Why the other options are wrong
- B. A footer sits at the bottom of the page and does not hold meta tags.
- C. The body holds the visible content; meta goes in the head.
- D. Header is correct, so None of the above is wrong.
Tip: Meta goes in the head section.
Question 7Medium
How do I add scrolling text to my page?
- <scroll>
- <circular>
- <marquee>
- None of the above
Answer: C. <marquee>
Explanation
The HTML <marquee> tag is used for scrolling piece of text or image displayed either horizontally across or vertically down your web site page depending on the settings.
e.g<marquee>This is basic example of marquee</marquee>
Step-by-step solution
- The marquee tag makes text or images scroll across or down the page.
- Scroll, circular and the other options are not HTML tags for scrolling.
- So the correct answer, option C (marquee), is right.
Why the other options are wrong
- A. Scroll is not an HTML tag.
- B. Circular is not an HTML tag.
- D. Marquee is a valid tag, so none of the above is wrong.
Tip: For scrolling text in these questions, the answer is the marquee tag.
Question 8Medium
Linking to another place in the same or another web page requires two A (Anchor) tags, the first with the __attribute and the second the__attribute.
- Name and link
- Link and href
- Name and href
- Name and target
Answer: C. Name and href
Explanation
The first anchor tag marks the place with the name attribute, and the second tag links to it with the href attribute.
Step-by-step solution
- A link to a place in the same page needs two anchor tags.
- The first A tag marks the place with the name attribute.
- The second A tag links to that place with the href attribute.
- So the answer is Name and href: option C.
Why the other options are wrong
- A. 'link' is not the attribute name; the second tag uses href.
- B. 'link' is not an attribute of the A tag; the marker uses name.
- D. target sets where the link opens; it does not mark the place.
Tip: name marks the destination; href points to it.
Question 9Medium
Which sequence of HTML tags is correct?
- <html><br><head><title></title></head><br><body></body><br></html>
- <html><br><head></head><br><body><title></title></body><br></html>
- <html><br><head><title></title><br><body></body></head><br></html>
- <html><br><title></title><head></head><body></body><br></html>
Answer: A. <html><br><head><title></title></head><br><body></body><br></html>
Explanation
The above given is the general format of HTML tags.
Every opening tag must have closing tag because in HTML sequence of tags matters.
Step-by-step solution
- A valid page starts with html, then has a head and a body inside it.
- The title tag must sit inside head, and body comes after head.
- Option A nests head with title inside it, then body, so the correct answer 0 is right. The br tags are only line breaks.
Why the other options are wrong
- B. Title is placed inside body and head is empty, which is wrong.
- C. Body sits inside head, which is wrong.
- D. Title is outside head and sits before it, which is wrong.
Tip: The order is html, then head with title, then body. Head comes before body.
Question 10Medium
Which of the following tags are related to Table in HTML?
- <head> <body>
- <row> <column>
- <table> <tr> <td>
- <header> <footer>
Answer: C. <table> <tr> <td>
Explanation
<table> defines a table, <tr> a row and <td> a data cell. <th>, <thead>, <tbody>, <tfoot> and <caption> are also table tags.
Step-by-step solution
- <table> defines the table.
- <tr> defines a table row.
- <td> defines a table cell.
- So <table> <tr> <td> are the table tags.
Why the other options are wrong
- A. <head> and <body> are page sections, not table tags.
- B. <row> and <column> are not HTML tags.
- D. <header> and <footer> are page sections, not table tags.
Tip: A table is built as table, then rows (tr), then cells (td or th).
Practise all 15 questions free
The full question bank with timed practice, progress tracking and Vidya, your AI tutor. Free, no ads.
Open this topic in the app →