Autoevaluación Pendiente
Repaso integral de Sección 7 Elige una respuesta en cada pregunta. Si fallas, puedes volver a intentarlo.
En una ficha de producto tienes una foto protagonista arriba y 6 miniaturas abajo. ¿Dónde debe ir fetchpriority="high"? En el <img> protagonista de arriba (sin loading="lazy") En todas las 6 miniaturas de abajo junto con loading="lazy" En la etiqueta <figcaption>
¿Cuál de estas parejas de atributos pertenece a una pista de subtítulos accesibles por defecto en español? <track kind="captions" src="/es.vtt" srclang="es" label="Español" default> <track kind="poster" src="/es.jpg" autoplay> <source kind="captions" src="/es.vtt">
Ordena la estructura Pendiente
Secuencia de una galería multimedia rápida Ordena las piezas de la página desde la imagen protagonista hasta el vídeo con subtítulos.
< video controls playsinline poster = "/p.jpg" width = "800" height = "450" > < source src = "/v.mp4" type = "video/mp4" > < track kind = "captions" src = "/es.vtt" srclang = "es" label = "Español" default > </ video > ↑ ↓
< picture > < source srcset = "/hero.avif" type = "image/avif" > < img src = "/hero.jpg" alt = "Exposición" width = "1200" height = "600" fetchpriority = "high" > </ picture > ↑ ↓
< figure > < img src = "/detalle.webp" alt = "Escultura" width = "600" height = "400" loading = "lazy" decoding = "async" > < figcaption > Detalle en piedra.</ figcaption > </ figure > ↑ ↓
Comprobar el orden Ir a Detective →
Detective de marcado Pendiente
Auditoría multimedia con tres tropiezos En este fragmento, la imagen principal está marcada para carga diferida y el vídeo carece de pista de subtítulos.
Paso 1: toca la línea que causa el problema.
1 < main > 2 < picture > 3 < source srcset = "/sala.avif" type = "image/avif" > 4 < img src = "/sala.jpg" alt = "Sala principal" width = "1200" height = "675" loading = "lazy" > 5 </ picture > 6 < video controls width = "800" height = "450" > < source src = "/guia.mp4" type = "video/mp4" > </ video > 7 </ main >
Ver pista Fíjate primero en el atributo loading de la imagen principal de portada.
Paso 2: elige cómo corregirlo correctamente.
Cambiar loading="lazy" por fetchpriority="high" en el <img> principal (y añadir <track kind="captions"> en <video>) Borrar alt="Sala principal" Poner <img> antes que <source> dentro de <picture>
Laboratorio en vivo Pendiente
Reto final: galería multimedia completa Construye un <main> con: (1) un <picture> de portada con <source type="image/avif"> y <img> con alt, width, height y fetchpriority="high"; (2) un <figure> con <img loading="lazy" decoding="async" alt="..."> y <figcaption>; y (3) un <video controls playsinline poster="..."> con <source> y <track kind="captions" srclang="es" default>.
Editor HTML del laboratorio Lo que debe cumplir 0/7
Portada <picture> con <source type="image/avif"> <img> de <picture> tiene fetchpriority="high" y alt <figure> tiene imagen diferida (loading="lazy", decoding="async") La imagen de <figure> tiene alt descriptivo y <figcaption> Incluye <figcaption> dentro de <figure> <video> incluye controls, playsinline y poster <video> incluye <track kind="captions" srclang="es" default> Vista previa Navegador
Pista (0/3) Ver solución Restaurar
solucion.html
< main >
< picture >
< source srcset = "/img/hero.avif" type = "image/avif" >
< img src = "/img/hero.jpg" alt = "Entrada del pabellón de arquitectura" width = "1200" height = "675" fetchpriority = "high" >
</ picture >
< figure >
< img src = "/img/pieza.jpg" alt = "Maqueta a escala de la cubierta" width = "800" height = "533" loading = "lazy" decoding = "async" >
< figcaption > Figura 1. Maqueta original en madera de balsa.</ figcaption >
</ figure >
< video controls playsinline poster = "/media/poster.jpg" width = "800" height = "450" >
< source src = "/media/visita.mp4" type = "video/mp4" >
< track kind = "captions" src = "/media/visita-es.vtt" srclang = "es" label = "Español" default >
</ video >
</ main > <main>
<picture>
<source srcset="/img/hero.avif" type="image/avif">
<img src="/img/hero.jpg" alt="Entrada del pabellón de arquitectura" width="1200" height="675" fetchpriority="high">
</picture>
<figure>
<img src="/img/pieza.jpg" alt="Maqueta a escala de la cubierta" width="800" height="533" loading="lazy" decoding="async">
<figcaption>Figura 1. Maqueta original en madera de balsa.</figcaption>
</figure>
<video controls playsinline poster="/media/poster.jpg" width="800" height="450">
<source src="/media/visita.mp4" type="video/mp4">
<track kind="captions" src="/media/visita-es.vtt" srclang="es" label="Español" default>
</video>
</main> ¡Sección 7 completada! Dominas imágenes modernas, rendimiento nativo, multimedia accesible, SVG y MathML Core.