--- id: 587d778c367417b2b2512aa9 title: Estandarizar horas con el atributo datetime HTML5 challengeType: 0 videoUrl: 'https://scrimba.com/c/cmzMgtz' forumTopicId: 301025 dashedName: standardize-times-with-the-html5-datetime-attribute --- # --description-- Continuando con el tema de fecha, HTML5 también introdujo el elemento `time` junto con un atributo `datetime` para estandarizar los tiempos. Este es un elemento inline que puede ajustar una fecha u hora en una página. Un formato válido de esa fecha se mantiene mediante el atributo `datetime`. Este es el valor al que acceden los dispositivos de asistencia. Ayuda a evitar confusiones al indicar una versión estandarizada de un tiempo, incluso si está escrito de manera informal o coloquial en el texto. Aquí hay un ejemplo: `

Master Camper Cat officiated the cage match between Goro and Scorpion , which ended in a draw.

` # --instructions-- ¡Ya tenemos los resultados de la encuesta de Mortal Kombat de Camper Cat! Envuelva una etiqueta `time` alrededor del texto `Thursday, September 15th` y agregue un atributo `datetime` establecido en `2016-09-15`. # --hints-- Tu código debe tener un elemento `p` que incluya el texto `Thank you to everyone for responding to Master Camper Cat's survey.` e incluye un elemento `time`. ```js assert(timeElement.length); ``` Las etiquetas `time` añadidas deben envolver el texto `Thursday, September 15th`. ```js assert( timeElement.length && $(timeElement).html().trim() === 'Thursday, September 15th' ); ``` Tu etiqueta `time` agregada debe tener un atributo `datetime` que no esté vacío. ```js assert(datetimeAttr && datetimeAttr.length); ``` Tu atributo `datetime` agregado debe establecerse en un valor de `2016-09-15`. ```js assert(datetimeAttr === '2016-09-15'); ``` # --seed-- ## --after-user-code-- ```html ``` ## --seed-contents-- ```html

Tournaments

Mortal Kombat Tournament Survey Results

Thank you to everyone for responding to Master Camper Cat's survey. The best day to host the vaunted Mortal Kombat tournament is Thursday, September 15th. May the best ninja win!

Comments:

Posted by: Sub-Zero on

Johnny Cage better be there, I'll finish him!

Posted by: Doge on

Wow, much combat, so mortal.

Posted by: The Grim Reaper on

Looks like I'll be busy that day.

© 2018 Camper Cat
``` # --solutions-- ```html

Tournaments

Mortal Kombat Tournament Survey Results

Thank you to everyone for responding to Master Camper Cat's survey. The best day to host the vaunted Mortal Kombat tournament is . May the best ninja win!

Comments:

Posted by: Sub-Zero on

Johnny Cage better be there, I'll finish him!

Posted by: Doge on

Wow, much combat, so mortal.

Posted by: The Grim Reaper on

Looks like I'll be busy that day.

```