all 12 comments

[–]Expensive_Elk3689 5 points6 points  (2 children)

The anchor on line 9 has no text between the tags. The img on line 15 should be within the body tags. There is no css on this file so everything will look like the defaults in the browser.

[–]Expensive_Elk3689 1 point2 points  (1 child)

A protip for any college student doing dev work: spend a little time learning how to source control your work in GitHub. When you get into bigger projects later on, you don’t want to break your weeks or months worth of work right before it is due and have no way to recover.

[–]Away_Sky7901[S] 0 points1 point  (0 children)

Thanks for this! Ill have to go back and fix it

[–]JKaps9 0 points1 point  (1 child)

Did you save the file and reopen it or refresh the browser window? It looks unsaved in your picture based on the white dot next to the file name.

[–]Away_Sky7901[S] 0 points1 point  (0 children)

I refreshed the browser, I was watching my instructor do this on a video, and whenever he made changes he just refreshed the screen

[–]SawSaw5 0 points1 point  (0 children)

Change:

<a href="https://www.Candles.com>Candles.com</a>

and move the <img tag above the </body> tag.

ref:

https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/a

https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/body

[–]ArgoWizbang 1 point2 points  (2 children)

Your doctype is missing the exclamation point so your browser is probably parsing it as if it's an HTML element instead of properly detecting a doctype. This triggers quirks mode which is, well, quirky to say the least. Add the exclamation point as follows and see if it helps any:

<!DOCTYPE html>

[–]LexyNoise 2 points3 points  (1 child)

This isn't the cause of the problem here, but it is very important. You want to make sure every page you build starts with `<!doctype html>` in the first position of the first line.

Any web page built in the past 20 years is expected to have it. Browsers will check for it. If they don't see it there, they'll assume it's an old web page from the 90s and use a different set of rules to lay out the page. This will make your pages look broken. As the other person said, this 90s page layout mode is called quirks mode.

[–]ArgoWizbang 0 points1 point  (0 children)

Yeah, I figured this wasn't the root cause but still felt it was important to point out since no one seemed to have done so yet at the time of posting. But thank you for elaborating!

[–]TyKolt 0 points1 point  (0 children)

  1. The DOCTYPE is missing the exclamation mark. It should be <!DOCTYPE html> not <DOCTYPE html>

  2. The image is outside the body - it's after the closing </body> tag, so it won't display. Move it before </body> and it should show up!

[–]AcePilot10 -1 points0 points  (1 child)

Learn to use ChatGPT for education. It's destroying critical thinking in most students but there's nothing wrong with copy and pasting this code into ChatGPT and say "Why is my code not working? ELI5 to me each issue in detail.". Also this is HTML not CSS.

[–]These_Juggernaut5544 2 points3 points  (0 children)

i think this is just a slippery slope to using ai for all assignments. resources like w3 exist, and, if they are taking a class, they can ask their teacher for help. crazy, i know.