Help with using 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

Thanks!

Welcome, oleary.

I am not sure what you mean, because I can see many divs 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 :gear: 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 :gear: 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.

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

Hope this helps

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.

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.

1 Like