# Help with using div

**URL:** <https://forum.freecodecamp.org/t/help-with-using-div/365322>\
**Category:** General\
**Created:** [March 29, 2020, 6:18pm UTC](https://forum.freecodecamp.org/t/help-with-using-div/365322 "2020-03-29T18:18:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![oleary709](https://avatars.discourse-cdn.com/v4/letter/o/b9e5f3/32.png) [@oleary709](https://forum.freecodecamp.org/u/oleary709)\
**Post date:** [March 29, 2020, 6:18pm UTC](https://forum.freecodecamp.org/t/help-with-using-div/365322/1 "2020-03-29T18:18:46Z")

</div>

Hey guys, I am very new to coding and have just recently finished the survey form. Unfortunately the only way I was able to complete the 17 tasks was by not having any div elements. Whenever I tried to apply them I lost all my progress, even though it looked better the test would come up with 9/17 instead of the 17/17 I get without the tag.

Is there a way to space out my page and make it better? I tried the display:block; but that didn’t work either. How can I use the div tags without failing the test?

Link to code: [https://codepen.io/oleary709/pen/wvaNvve](https://codepen.io/oleary709/pen/wvaNvve)

Thanks!

---

<div class="post-metadata">

**Author:** ![Sky020](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/sky020/32/128093_2.png) [@Sky020](https://forum.freecodecamp.org/u/Sky020)\
**Post date:** [March 29, 2020, 6:31pm UTC](https://forum.freecodecamp.org/t/help-with-using-div/365322/2 "2020-03-29T18:31:02Z")

</div>

Welcome, oleary.

I am not sure what you mean, because I can see many `div`s in your HTML. Also, some things to note when using CodePen:

1. CodePen does not expect any content outwith the `body` tags.
2. All `meta`, `link`, and `script` information must be put in the ⚙ settings section of the HTML editor.
3. You do not need to/cannot link the _CSS_ in your HTML, if you place the CSS in the appropriate section.
4. If your project uses React, use the Babel preprocessor, and link the CDN in the appropriate ⚙ section.
5. The editors offer the ability to format and analyse your code, providing useful information about forgotten closing tags _etc._

If you are still confused with how to use CodePen, please read the official [documentation](https://blog.codepen.io/documentation/).

You have a few syntax errors in your code. Use the analyse tool in CodePen to find most of them.

Hope this helps

---

<div class="post-metadata">

**Author:** ![oleary709](https://avatars.discourse-cdn.com/v4/letter/o/b9e5f3/32.png) [@oleary709](https://forum.freecodecamp.org/u/oleary709)\
**Post date:** [March 29, 2020, 6:47pm UTC](https://forum.freecodecamp.org/t/help-with-using-div/365322/3 "2020-03-29T18:47:16Z")

</div>

Great, thanks for the help. Whenever I tried to use div’s is when I ran into trouble so I had to take them out. I will read up on how to use code pen and change those settings.

---

<div class="post-metadata">

**Author:** ![lasjorg](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/lasjorg/32/280761_2.png) [@lasjorg](https://forum.freecodecamp.org/u/lasjorg)\
**Post date:** [March 29, 2020, 7:09pm UTC](https://forum.freecodecamp.org/t/help-with-using-div/365322/4 "2020-03-29T19:09:15Z")

</div>

I would suggest you fork your code (press the fork button in the footer).

Then in the fork add the HTML you want to add but you say makes the tests fail. Post a link to that forked project so we can help.

---

<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:** [June 1, 2021, 7:00pm UTC](https://forum.freecodecamp.org/t/help-with-using-div/365322/5 "2021-06-01T19:00:39Z")

</div>

Closed on June 1, 2021, 7:00pm UTC


