HTML MCQ Test
HTML MCQ Test
---
Formatting Tags
---
12. What attribute is used in <a> tag to define the link address?
a) src
b) href
c) alt
d) link
---
Tables
21. Which attribute sets space between cell content and cell border?
a) cellpadding
b) cellspacing
c) border
d) margin
---
Lists
---
---
Frames
40. Which tag is used to embed a frame inside a webpage in modern HTML?
a) <frame>
b) <iframe>
c) <frameset>
d) <frametag>
---
50. What HTML5 input type is used to select values in a defined range?
a) type="slider"
b) type="range"
c) type="bar"
d) type="number"
2. The HTML element used to define the main body content is:
a) <page>
b) <section>
c) <main>
d) <content>
---
---
11. Which attribute in the <a> tag is used to open a link in a new tab?
a) ref="new"
b) window="new"
c) target="_blank"
d) open="true"
13. What attribute is used to define the tooltip text for an anchor tag?
a) alt
b) label
c) title
d) caption
14. Which tag is used to create a link to a specific point on the same page?
a) <namelink>
b) <idanchor>
c) <a name="...">
d) <tag="...">
---
16. What attribute in the <img> tag provides alternate text for an image?
a) title
b) tooltip
c) alt
d) label
18. To add a clickable image that links to another page, you use:
a) <a img="...">
b) <link><img></link>
c) <a href="..."><img></a>
d) <img link="...">
20. Which format is not typically used for images on web pages?
a) .jpg
b) .bmp
c) .gif
d) .webp
---
**Tables – Advanced**
21. Which tag is used to group the table header content?
a) <thead>
b) <head>
c) <tblhead>
d) <header>
---
**Lists – Advanced**
---
**Forms – Advanced**
31. What input type hides the text entered by the user?
a) type="secure"
b) type="code"
c) type="password"
d) type="hidden"
34. Which input type allows selecting a file from the system?
a) type="file"
b) type="data"
c) type="image"
d) type="document"
39. Which element lets you display static text inside a form?
a) <static>
b) <label>
c) <output>
d) <display>
---
41. Which tag is used for content that is slightly related to the main content?
a) <section>
b) <aside>
c) <extra>
d) <float>
46. Which input type limits value selection to predefined options with typing?
a) type="picker"
b) type="range"
c) <datalist>
d) type="dropdown"
49. Which tag is used to group content together in the main document flow?
a) <bodygroup>
b) <main>
c) <join>
d) <divset>