Skip to content
Learn Netverks

Lesson

Step 14/31 45% through track

images-and-figures

Images, figures, and responsive sizing

Last reviewed May 28, 2026 Content v20260528
Track mode
iframe_html
Means
HTML preview sandbox
Reading
~1 min
Level
intermediate

This lesson

This lesson teaches Images, figures, and responsive sizing—the ideas, syntax, and habits you need before moving on in HTML & CSS.

Without a solid grasp of Images, figures, and responsive sizing, you will repeat mistakes in HTML & CSS exercises and on real pages or scripts.

You will apply Images, figures, and responsive sizing in contexts like: Hero sections, articles, galleries, and social preview cards.

Read the lesson, edit HTML/CSS in the playground, press Run to preview, then answer the lesson MCQs.

When the previous lesson's MCQs feel easy and you can explain Images, figures, and responsive sizing in your own words.

Images need meaningful alt text and often belong in <figure> with <figcaption>. CSS controls how they scale inside layouts.

HTML checklist

  • alt describes purpose (decorative images may use empty alt="").
  • width and height attributes reduce layout shift when possible.
  • loading="lazy" for below-the-fold images on real sites.

CSS sizing

  • max-width: 100%; height: auto; keeps images inside narrow columns.
  • object-fit: cover for cropped thumbnails in fixed boxes.

Practice

The sample uses a placeholder gradient block—replace with a real img src when you host assets. Adjust .thumb height and object-fit.

Important interview questions and answers

  1. Q: When is `alt=""` correct?
    A: When the image is decorative and surrounding text already conveys meaning.
  2. Q: What is layout shift related to images?
    A: Browser reserves space late if dimensions unknown—provide width/height or aspect-ratio.
  3. Q: Figure vs bare img?
    A: Figure groups image + caption as one unit of meaning.

Interview tip Lesson completion confidence

Can you explain this lesson in 30 seconds without reading notes?

Not saved yet.

Playground

Runs in your browser in a sandboxed frame. Backend runners appear when this track’s profile allows them.

Check yourself

Multiple choice — immediate feedback.

Discussion

Past discussion is visible to everyone. Only logged-in users can post comments and replies.

Starter discussion topics

  • What part of this lesson needs a second read?
  • What would you try differently in a real project?

Sign up or log in to post comments and sync lesson progress across devices.

No discussion yet. Be the first to ask a question.

Jump