# freeCodeCamp Challenge Guide: Introduction to HTML5 Elements

**URL:** <https://forum.freecodecamp.org/t/freecodecamp-challenge-guide-introduction-to-html5-elements/301097>\
**Category:** freeCodeCamp Contributors\
**Tags:** guide\
**Created:** [August 3, 2019, 5:36am UTC](https://forum.freecodecamp.org/t/freecodecamp-challenge-guide-introduction-to-html5-elements/301097 "2019-08-03T05:36:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![camperbot](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/camperbot/32/18364_2.png) [@camperbot](https://forum.freecodecamp.org/u/camperbot)\
**Post date:** [August 3, 2019, 5:36am UTC](https://forum.freecodecamp.org/t/freecodecamp-challenge-guide-introduction-to-html5-elements/301097/1 "2019-08-03T05:36:19Z")

</div>

# [Introduction to HTML5 Elements](https://www.freecodecamp.org/learn/responsive-web-design/basic-html-and-html5/introduction-to-html5-elements)

* * *

## Problem Explanation

The example below represent a `h1` element and a `h4` element wrapped into a `header` element:

```auto
<header>
  <h1> Big title </h1>
  <h4> Tiny subtitle </h4>
</header>

```

As you can see the `header` contains the other elements that ends up on the same level ( the `h1` ends before the `h4` starts and both are nested into the `header`).

* * *

## Solutions

> **Solution 1 (Click to Show/Hide)**
>
> Firstly, we will need to add a second `<p>` element below the first `<p>` element, which needs to say `Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.`, as shown below:
> 
> **Before adding 2nd `<p>` element**
> 
> ```html
> <h2>CatPhotoApp</h2>
> 
> <p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
> 
> ```
> 
> **After adding 2nd `<p>` element**
> 
> ```html
> <h2>CatPhotoApp</h2>
> 
> <p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
> <p>Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched. </p> <!-- The second <p> element has been added -->
> 
> ```
> 
> However, the objective also requires the user to add the `<main>` elements between the `<p>` elements as shown below:
> 
> **Before adding `<main>` element**
> 
> ```html
> <h2>CatPhotoApp</h2>
> 
> <p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
> <p>Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched. </p>
> 
> ```
> 
> **After adding `<main>` element**
> 
> ```html
> <h2>CatPhotoApp</h2>
> <main> <!-- The opening <main> element has been added -->
> <p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
> <p>Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched. </p>
> </main> <!-- The closing <main> element has been added -->
> 
> ```
> 
> **Full Solution**
> 
> ```html
> <h2>CatPhotoApp</h2>
> <main>
> <p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
> <p>Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched. </p>
> </main>
> 
> ```

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [January 8, 2025, 3:59pm UTC](https://forum.freecodecamp.org/t/freecodecamp-challenge-guide-introduction-to-html5-elements/301097/2 "2025-01-08T15:59:23Z")

</div>

Closed on January 8, 2025, 3:59pm UTC


