What is the role of the 'alt' attribute in an HTML img tag? MCQ with Answer and Explanation

What is the role of the 'alt' attribute in an HTML img tag?
A. To define image dimensions
B. To add a tooltip
C. To specify alternative text for accessibility and when image fails to load
D. To set the image source
Answer: Option C
Solution (By JKSSB Mock Tests)
The alt attribute provides a text alternative for an image, improving accessibility and providing fallback content if the image cannot be displayed.

Discuss this Question (0)

No comments yet. Be the first to start the discussion!

Practice More Internet and Web Technologies Questions

Question #1
What is the role of a web-based application firewall (WAF)?
A. To accelerate content delivery
B. To manage DNS
C. To filter and monitor HTTP traffic to protect web applications
D. To provide load balancing

Correct Answer: Option C


Explanation:
A WAF specifically monitors and filters HTTP traffic, blocking malicious requests, and protecting against common web vulnerabilities.

This question belongs to: Computer Internet and Web Technologies
Question #2
Which of the following is a valid scheme in a URL?
A. ftp
B. All of the above
C. http
D. https

Correct Answer: Option B


Explanation:
http, https, and ftp are all valid URL schemes (protocols).

This question belongs to: Computer Internet and Web Technologies
Question #3
What is the primary function of a 'MIME' (Multipurpose Internet Mail Extensions) header statement added inside a modern email message file?
A. To track the geographic location coordinates of the target recipient host
B. To announce the specific media format type and character configuration of the email body payload and attachments
C. To encrypt user server passwords securely using asymmetric algorithms
D. To wipe old email logs automatically from client hardware setups

Correct Answer: Option B


Explanation:
MIME headers let email clients know if an incoming message contains rich HTML text, images, sound files, or binary documents so the client software can render them correctly.

This question belongs to: Computer Internet and Web Technologies