SkillSeevaSkillSeeva
HomeResourcesScheduleRoadmapTeam
Back to Categories
Current Path
HTML5
Introduction & BasicsHTML ElementsAttributesHeadings & ParagraphsStyles & ColorsLinks (Anchors)Images & ResponsiveTablesListsBlock vs InlineClasses & IDsForms & Input TypesSemantic HTMLMeta Tags & SEOVideo & AudioPerformance OptimizationAccessibility (ARIA)Web APIs (Geo, D&D)
Jump to topic:
Introduction & BasicsHTML ElementsAttributesHeadings & ParagraphsStyles & ColorsLinks (Anchors)Images & ResponsiveTablesListsBlock vs InlineClasses & IDsForms & Input TypesSemantic HTMLMeta Tags & SEOVideo & AudioPerformance OptimizationAccessibility (ARIA)Web APIs (Geo, D&D)

Images & Responsive

Images are defined with the <img> tag. Modern web requires responsive images.
html
<img src="pic_trulli.jpg" alt="Italian Trulli" width="500" height="333">

<!-- Responsive Picture -->
<picture>
  <source media="(min-width: 650px)" srcset="img_pink_flowers.jpg">
  <source media="(min-width: 465px)" srcset="img_white_flower.jpg">
  <img src="img_orange_flowers.jpg" alt="Flowers" style="width:auto;">
</picture>
The alt attribute is required. A web page will not validate correctly without it.
7 / 18