questions and correct answers (verified answers) q
&a 2027|instant download pdf
1. What is the primary purpose of HTML in web development?
A. To style web pages
B. To structure and describe web content
C. To manage databases
D. To encrypt network traffic
Answer: B. To structure and describe web content
Rationale: HTML (HyperText Markup Language) provides the
structure and semantic meaning of content on a web page.
2. Which HTML element is used for the largest main heading?
A. <heading>
B. <h6>
C. <h1>
D. <head>
Answer: C. <h1>
Rationale: <h1> represents the highest-level heading, while
<h6> represents the lowest heading level.
3. Which HTML element creates a hyperlink?
,A. <link>
B. <a>
C. <href>
D. <url>
Answer: B. <a>
Rationale: The anchor element <a> creates hyperlinks,
commonly using the href attribute to specify the destination.
4. Which attribute specifies the destination of an HTML
hyperlink?
A. src
B. link
C. href
D. target
Answer: C. href
Rationale: The href attribute specifies the URL or destination
associated with an anchor element.
5. Which HTML element is used to display an image?
A. <picture>
B. <image>
C. <img>
D. <src>
,Answer: C. <img>
Rationale: <img> embeds an image in an HTML document. Its
src attribute identifies the image file.
6. What is the purpose of the alt attribute on an image?
A. To change image dimensions
B. To provide alternative text
C. To compress the image
D. To create an animation
Answer: B. To provide alternative text
Rationale: Alternative text describes an image for users who
cannot see it and supports accessibility.
7. Which HTML element represents a paragraph?
A. <paragraph>
B. <text>
C. <p>
D. <para>
Answer: C. <p>
Rationale: The <p> element defines a paragraph of text.
8. Which HTML element creates an unordered list?
, A. <ol>
B. <ul>
C. <li>
D. <list>
Answer: B. <ul>
Rationale: <ul> creates an unordered list, while <ol> creates an
ordered list.
9. Which element represents an individual list item?
A. <item>
B. <li>
C. <list-item>
D. <i>
Answer: B. <li>
Rationale: <li> represents an individual item within an ordered
or unordered list.
10. Which declaration identifies a document as HTML5?
A. <html5>
B. <!HTML5>
C. <!DOCTYPE html>
D. <doctype html5>
Answer: C. <!DOCTYPE html>