---
id: 587d778c367417b2b2512aa9
title: Estandariza horas con el atributo HTML5 datetime
challengeType: 0
videoUrl: 'https://scrimba.com/c/cmzMgtz'
forumTopicId: 301025
dashedName: standardize-times-with-the-html5-datetime-attribute
---
# --description--
Continuando con el tema de fechas, HTML5 también introdujo el elemento `time` junto con un atributo `datetime` para estandarizar las horas. El elemento `time` es un elemento en línea que puede ajustar una fecha u hora en una página. Un atributo `datetime` contiene un formato válido para esa fecha. Este es el valor al que acceden los dispositivos de asistencia. Ayuda a evitar la confusión al declarar una versión estandarizada de un tiempo, incluso si está escrita informal o coloquialmente en el texto.
Aquí hay un ejemplo:
```html
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! Envuelve una etiqueta `time` alrededor del texto `Thursday, September 15th` y agregua 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 incluya un elemento `time`.
```js
assert(timeElement);
```
Las etiquetas `time` añadidas deben envolver el texto `Thursday, September 15th`.
```js
assert(
timeElement &&
timeElement?.innerHTML?.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.
```
# --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!