Jump into concepts and practice - no test required
or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Recall & Review
beginner
What is the purpose of alt text in images on a website?
Alt text describes the content of an image for people who cannot see it, such as users with visual impairments or when the image fails to load. It also helps search engines understand the image.
Click to reveal answer
beginner
Why is image optimization important for websites?
Image optimization reduces file size to make pages load faster, improving user experience and search engine rankings. It also saves bandwidth and helps mobile users with slower connections.
Click to reveal answer
intermediate
Name two common methods to optimize images for the web.
1. Compressing images to reduce file size without losing much quality. 2. Using the correct image format like JPEG for photos and PNG for graphics with transparency.
Click to reveal answer
intermediate
How does descriptive alt text improve SEO?
Search engines use alt text to understand what an image shows. Descriptive alt text can help the page rank better for related keywords and improve visibility in image search results.
Click to reveal answer
intermediate
What should you avoid when writing alt text?
Avoid using phrases like 'image of' or 'picture of' because screen readers already announce it as an image. Also, do not stuff keywords or write long descriptions that are not helpful.
Click to reveal answer
What does alt text primarily help with?
ADescribing images for screen readers
BChanging image colors
CIncreasing image file size
DAdding animations to images
✗ Incorrect
Alt text provides a description of images for screen readers and when images cannot be displayed.
Which image format is best for photos to optimize size and quality?
APNG
BGIF
CJPEG
DSVG
✗ Incorrect
JPEG is best for photos because it compresses images well while keeping quality.
Why should images be optimized on websites?
ATo slow down page loading
BTo improve page loading speed and user experience
CTo increase bandwidth usage
DTo make images blurry
✗ Incorrect
Optimized images load faster, improving user experience and SEO.
What is a bad practice when writing alt text?
AIncluding important keywords naturally
BUsing clear, descriptive words
CKeeping it short and relevant
DWriting 'image of' before the description
✗ Incorrect
Writing 'image of' is redundant because screen readers already identify images.
Which of these helps search engines understand images better?
AAlt text
BImage size
CImage resolution
DImage color
✗ Incorrect
Alt text provides context about the image content to search engines.
Explain why alt text is important for both accessibility and SEO.
Think about users who cannot see images and how search engines read websites.
You got /4 concepts.
Describe two ways to optimize images for faster website loading.
Focus on reducing file size and choosing the right format.
You got /4 concepts.
Practice
(1/5)
1. What is the primary purpose of alt text in images on a website?
easy
A. To increase the image file size
B. To add decorative effects to the image
C. To change the image color automatically
D. To describe the image for users who cannot see it
Solution
Step 1: Understand the role of alt text
Alt text provides a description of images for people who use screen readers or when images fail to load.
Step 2: Identify the correct purpose
It helps accessibility and SEO by describing the image content clearly.
Final Answer:
To describe the image for users who cannot see it -> Option D
Quick Check:
Alt text = Image description for accessibility [OK]
Hint: Alt text describes images for accessibility and SEO [OK]
Common Mistakes:
Thinking alt text changes image appearance
Using alt text for decoration only
Ignoring alt text for SEO benefits
2. Which of the following is the correct way to add alt text to an image in HTML?
easy
A. <img alt=A sunny beach src='photo.jpg'>
B. <image src='photo.jpg' alttext='A sunny beach'>
C. <img src='photo.jpg' alt='A sunny beach'>
D. <img src='photo.jpg' description='A sunny beach'>
Solution
Step 1: Review correct HTML syntax for images
The <img> tag uses the alt attribute to provide alternative text.
Step 2: Identify the valid syntax
Only <img src='photo.jpg' alt='A sunny beach'> uses the correct img tag, src and alt attributes, and proper quoting for values. The others use wrong tags (image), incorrect attributes (alttext, description), or unquoted values with spaces.
Final Answer:
<img src='photo.jpg' alt='A sunny beach'> -> Option C
Quick Check:
Use alt attribute inside <img> tag [OK]
Hint: Use alt attribute inside <img> tag [OK]
Common Mistakes:
Using wrong attribute names like alttext or description
Using <image> instead of <img>
Failing to properly quote attribute values
3. Consider this HTML snippet: <img src='logo.png' alt='Company logo' width='200' height='100'> What is the main SEO benefit of including the alt attribute here?
medium
A. It improves page loading speed
B. It helps search engines understand image content
C. It changes the image size automatically
D. It hides the image from users
Solution
Step 1: Analyze the role of alt text in SEO
Alt text provides a textual description that search engines can read to understand what the image represents.
Step 2: Identify the SEO benefit
This helps improve the website's relevance and ranking for related searches.
Final Answer:
It helps search engines understand image content -> Option B
Quick Check:
Alt text = SEO image description [OK]
Hint: Alt text helps search engines understand images [OK]
Common Mistakes:
Confusing alt text with image size or speed
Thinking alt text hides images
Assuming alt text changes image appearance
4. A website owner notices their images are loading very slowly. Which of the following is the best way to fix this issue while keeping good SEO practices?
medium
A. Compress images before uploading and keep descriptive alt text
B. Remove all alt text to reduce file size
C. Use very large images for better quality
D. Delete images and replace with text only
Solution
Step 1: Identify the cause of slow loading
Large image files cause slow loading; compressing reduces file size without losing much quality.
Step 2: Maintain SEO best practices
Keeping descriptive alt text ensures accessibility and SEO benefits remain intact.
Final Answer:
Compress images before uploading and keep descriptive alt text -> Option A
Quick Check:
Compress images + keep alt text = faster and SEO-friendly [OK]
Hint: Compress images but keep alt text for SEO [OK]
Common Mistakes:
Removing alt text to save size (hurts SEO/accessibility)
Uploading large images without compression
Removing images entirely reduces user experience
5. You want to optimize a product page with many images for both SEO and user experience. Which combination of actions is best?
hard
A. Use descriptive alt text, compress images, and add captions for clarity
B. Use generic alt text like 'image1', upload large images, and skip captions
C. Remove alt text, use uncompressed images, and add decorative borders
D. Use alt text only on the first image and ignore others
Solution
Step 1: Combine SEO and user experience best practices
Descriptive alt text improves SEO and accessibility; compressing images speeds up loading; captions help users understand images.
Step 2: Evaluate other options
Generic alt text or removing alt text harms SEO; large images slow loading; skipping captions reduces clarity.
Final Answer:
Use descriptive alt text, compress images, and add captions for clarity -> Option A
Quick Check:
Alt text + compression + captions = best SEO and UX [OK]
Hint: Combine alt text, compression, and captions for best results [OK]