123 lines
2.8 KiB
Markdown
123 lines
2.8 KiB
Markdown
![]() |
---
|
||
|
id: 587d781b367417b2b2512abb
|
||
|
title: Crea una línea horizontal usando el elemento hr
|
||
|
challengeType: 0
|
||
|
videoUrl: 'https://scrimba.com/c/c3bR8t7'
|
||
|
forumTopicId: 301049
|
||
|
dashedName: create-a-horizontal-line-using-the-hr-element
|
||
|
---
|
||
|
|
||
|
# --description--
|
||
|
|
||
|
Puedes usar la etiqueta `hr` para agregar una línea horizontal a través del ancho de su elemento contenedor. Esto se puede usar para definir un cambio de tema o para separa grupos de contenido visualmente.
|
||
|
|
||
|
# --instructions--
|
||
|
|
||
|
Agrega una etiqueta `hr` debajo de `h4` que contiene el título de la tarjeta.
|
||
|
|
||
|
**Nota:** en HTML, la etiqueta `hr` se cierra sola, por lo tanto no necesita una etiqueta de cierre por separado.
|
||
|
|
||
|
# --hints--
|
||
|
|
||
|
Tu código debe agregar una etiqueta `hr` al lenguaje de marcado.
|
||
|
|
||
|
```js
|
||
|
assert($('hr').length == 1);
|
||
|
```
|
||
|
|
||
|
La etiqueta `hr` debe estar entre el título y el párrafo.
|
||
|
|
||
|
```js
|
||
|
assert(code.match(/<\/h4>\s*?<hr(>|\s*?\/>)\s*?<p>/gi));
|
||
|
```
|
||
|
|
||
|
# --seed--
|
||
|
|
||
|
## --seed-contents--
|
||
|
|
||
|
```html
|
||
|
<style>
|
||
|
h4 {
|
||
|
text-align: center;
|
||
|
height: 25px;
|
||
|
}
|
||
|
p {
|
||
|
text-align: justify;
|
||
|
}
|
||
|
.links {
|
||
|
text-align: left;
|
||
|
color: black;
|
||
|
}
|
||
|
.fullCard {
|
||
|
width: 245px;
|
||
|
border: 1px solid #ccc;
|
||
|
border-radius: 5px;
|
||
|
margin: 10px 5px;
|
||
|
padding: 4px;
|
||
|
}
|
||
|
.cardContent {
|
||
|
padding: 10px;
|
||
|
}
|
||
|
.cardText {
|
||
|
margin-bottom: 30px;
|
||
|
}
|
||
|
</style>
|
||
|
<div class="fullCard">
|
||
|
<div class="cardContent">
|
||
|
<div class="cardText">
|
||
|
<h4><s>Google</s>Alphabet</h4>
|
||
|
|
||
|
<p><em>Google was founded by Larry Page and Sergey Brin while they were <u>Ph.D. students</u> at <strong>Stanford University</strong>.</em></p>
|
||
|
</div>
|
||
|
<div class="cardLinks">
|
||
|
<a href="https://en.wikipedia.org/wiki/Larry_Page" target="_blank" class="links">Larry Page</a><br><br>
|
||
|
<a href="https://en.wikipedia.org/wiki/Sergey_Brin" target="_blank" class="links">Sergey Brin</a>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
```
|
||
|
|
||
|
# --solutions--
|
||
|
|
||
|
```html
|
||
|
<style>
|
||
|
h4 {
|
||
|
text-align: center;
|
||
|
height: 25px;
|
||
|
}
|
||
|
p {
|
||
|
text-align: justify;
|
||
|
}
|
||
|
.links {
|
||
|
text-align: left;
|
||
|
color: black;
|
||
|
}
|
||
|
.fullCard {
|
||
|
width: 245px;
|
||
|
border: 1px solid #ccc;
|
||
|
border-radius: 5px;
|
||
|
margin: 10px 5px;
|
||
|
padding: 4px;
|
||
|
}
|
||
|
.cardContent {
|
||
|
padding: 10px;
|
||
|
}
|
||
|
.cardText {
|
||
|
margin-bottom: 30px;
|
||
|
}
|
||
|
</style>
|
||
|
<div class="fullCard">
|
||
|
<div class="cardContent">
|
||
|
<div class="cardText">
|
||
|
<h4><s>Google</s>Alphabet</h4>
|
||
|
<hr>
|
||
|
<p><em>Google was founded by Larry Page and Sergey Brin while they were <u>Ph.D. students</u> at <strong>Stanford University</strong>.</em></p>
|
||
|
</div>
|
||
|
<div class="cardLinks">
|
||
|
<a href="https://en.wikipedia.org/wiki/Larry_Page" target="_blank" class="links">Larry Page</a><br><br>
|
||
|
<a href="https://en.wikipedia.org/wiki/Sergey_Brin" target="_blank" class="links">Sergey Brin</a>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
```
|