Why are my HTML elements shifting unexpectedly?

0
3
Asked By BakingNinja77 On

I'm currently working on a recipe project for my freeCodeCamp course, but I've noticed that the instructions and some elements in my HTML seem to shift forward unexpectedly. I've edited the code to correct some mistakes, but I can't figure out why this is happening. Here's the HTML code I've written so far:

4 Answers

Answered By FirstTimer21 On

I understand the struggle! This is my first time diving into coding as well, and I often made similar mistakes. It can be a bit challenging if you're not used to typing or using HTML notation. If you're seeing that your text is shifting and is kind of centered when it should be aligned left, it might be caused by those misplaced tags or some CSS styles that were inadvertently applied.

Answered By TroubleshooterX On

Another quick tip: make sure you only have one tag in your HTML. Having multiple tags can definitely cause display issues!

Answered By CookMaster101 On

It looks like you've got a few errors in your HTML, which might be causing the odd shifting you're seeing. Don't get discouraged; this happens to all of us while learning! A good starting point is to use the W3C Validator to spot mistakes in your code—just visit validator.w3.org and paste your HTML in there. Fix any errors the validator points out one step at a time.

Answered By HTMLGuru23 On

Also, I noticed that some of your tags are actually opening tags when they should be closing tags. For example, make sure that your closing tags are correctly formatted like instead of <tag>.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.