2018-10-04 14:37:37 +01:00
---
id: 587d781c367417b2b2512ac2
title: Set the font-size for Multiple Heading Elements
challengeType: 0
videoUrl: 'https://scrimba.com/c/cPpQNT3'
2019-08-05 09:17:33 -07:00
forumTopicId: 301067
2018-10-04 14:37:37 +01:00
---
## Description
< section id = 'description' >
The < code > font-size< / code > property is used to specify how large the text is in a given element. This rule can be used for multiple elements to create visual consistency of text on a page. In this challenge, you'll set the values for all < code > h1< / code > through < code > h6< / code > tags to balance the heading sizes.
< / section >
## Instructions
< section id = 'instructions' >
2020-10-31 18:53:30 +00:00
< p > In the < code > style< / code > tags, set the < code > font-size< / code > of the:< / p >
< ul >
< li > < code > h1< / code > tag to 68px.< / li >
< li > < code > h2< / code > tag to 52px.< / li >
< li > < code > h3< / code > tag to 40px.< / li >
< li > < code > h4< / code > tag to 32px.< / li >
< li > < code > h5< / code > tag to 21px.< / li >
< li > < code > h6< / code > tag to 14px.< / li >
< / ul >
2018-10-04 14:37:37 +01:00
< / section >
## Tests
< section id = 'tests' >
```yml
tests:
- text: Your code should set the < code > font-size</ code > property for the < code > h1</ code > tag to 68 pixels.
2019-07-24 02:42:26 -07:00
testString: assert($('h1').css('font-size') == '68px');
2018-10-04 14:37:37 +01:00
- text: Your code should set the < code > font-size</ code > property for the < code > h2</ code > tag to 52 pixels.
2019-07-24 02:42:26 -07:00
testString: assert($('h2').css('font-size') == '52px');
2018-10-04 14:37:37 +01:00
- text: Your code should set the < code > font-size</ code > property for the < code > h3</ code > tag to 40 pixels.
2019-07-24 02:42:26 -07:00
testString: assert($('h3').css('font-size') == '40px');
2018-10-04 14:37:37 +01:00
- text: Your code should set the < code > font-size</ code > property for the < code > h4</ code > tag to 32 pixels.
2019-07-24 02:42:26 -07:00
testString: assert($('h4').css('font-size') == '32px');
2018-10-04 14:37:37 +01:00
- text: Your code should set the < code > font-size</ code > property for the < code > h5</ code > tag to 21 pixels.
2019-07-24 02:42:26 -07:00
testString: assert($('h5').css('font-size') == '21px');
2018-10-04 14:37:37 +01:00
- text: Your code should set the < code > font-size</ code > property for the < code > h6</ code > tag to 14 pixels.
2020-09-02 12:11:23 -05:00
testString: const regex = /h6\s*\{\s*font-size\s*:\s*14px\s*(;\s*\}|\})/i; assert.strictEqual(true, regex.test(code));
2018-10-04 14:37:37 +01:00
```
< / section >
## Challenge Seed
< section id = 'challengeSeed' >
< div id = 'html-seed' >
```html
< style >
2018-10-08 01:01:53 +01:00
2018-10-04 14:37:37 +01:00
< / style >
< h1 > This is h1 text< / h1 >
< h2 > This is h2 text< / h2 >
< h3 > This is h3 text< / h3 >
< h4 > This is h4 text< / h4 >
< h5 > This is h5 text< / h5 >
< h6 > This is h6 text< / h6 >
```
< / div >
< / section >
## Solution
< section id = 'solution' >
2019-04-29 01:13:38 +07:00
```html
< style >
h1 {
font-size: 68px;
}
h2 {
font-size: 52px;
}
h3 {
font-size: 40px;
}
h4 {
font-size: 32px;
}
h5 {
font-size: 21px;
}
h6 {
font-size: 14px;
}
< / style >
< h1 > This is h1 text< / h1 >
< h2 > This is h2 text< / h2 >
< h3 > This is h3 text< / h3 >
< h4 > This is h4 text< / h4 >
< h5 > This is h5 text< / h5 >
< h6 > This is h6 text< / h6 >
2018-10-04 14:37:37 +01:00
```
2019-07-18 08:24:12 -07:00
2018-10-04 14:37:37 +01:00
< / section >