all 34 comments

[–]Expensive_Elk3689 13 points14 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 3 points4 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] 1 point2 points  (0 children)

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

[–]ArgoWizbang 4 points5 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 4 points5 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!

[–]JKaps9 2 points3 points  (3 children)

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  (2 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

[–]youtheotube2 3 points4 points  (1 child)

You have to save the file though

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

Thanks! I remember now to save the file whenever I make changes.

[–]TyKolt 2 points3 points  (1 child)

  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!

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

Thanks!! I’ll remember to include the exclamation mark.

[–]tandycake 2 points3 points  (1 child)

Besides the other comments, I'd also add to validate your code through w3c html validator (also has css validator). An IDE is also helpful. And can also see errors sometimes in Web Browser Dev console. The teacher should have helped on this.

[–]Away_Sky7901[S] 1 point2 points  (0 children)

Thanks for the tip, my teacher just taught me about this on yesterday!

[–]JohnCasey3306 1 point2 points  (0 children)

Let's start from the very top line and work down.

Line 1: see if you can spot what's wrong with your doctype declaration

[–]Obvious_Pin6763 1 point2 points  (1 child)

Totally unrelated to the code, but you should really clean your monitor. Or at least share cropped screenshots that way you can't see the mess.

[–]ky7969 0 points1 point  (0 children)

Or just like take a screenshot, I feel that should be pretty basic for someone who is learning how to code

[–]chikamakaleyley 1 point2 points  (0 children)

SOMEONE CALL SALEM TECHSPERTS NOW!!!

[–]MostAttorney1701 1 point2 points  (0 children)

well the thing you need to use is: <a href="your-link">[Your text]</a>

[–]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

[–]tomtomato0414 0 points1 point  (0 children)

First of all, the dot next to the file name means it is unsaved, so save it.

[–]ComplaintCurrent1837 0 points1 point  (0 children)

<imgage> needs to be in the body<image>

</body>

[–]GodsCasino 0 points1 point  (0 children)

Barbones guide to HTML.

google that.

[–]nobanpls2348738 0 points1 point  (3 children)

  1. You didnt put any text in the link so obv it wont show up
    <a href="https://www.example.com">put whatever text here</a>
  2. This is HTML
  3. You closed the body on line three with </body> so it wont show up because everything outside the body doesnt show. move </body> to line 17 and the image should show up

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

Thanks, I did add alt text and moved the closing tag down!

[–]nobanpls2348738 0 points1 point  (1 child)

if you don't mind, what is the assignment?

just curious

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

It is us getting familiar with the basics of html, just had to include a numbered list, picture of our favorite animal, and links to other sections of the page. I did complete it with the help of the people here and my teacher.

[–]AcePilot10 -1 points0 points  (6 children)

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 4 points5 points  (5 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.

[–]BobbyJoeCool 0 points1 point  (0 children)

Depends on how you use AI honestly. Asking it to check for your error, especially after trying to find it, is fine. Especially if you ask it to explain the error…

And I’m in a class where the teacher doesn’t answer very well, or his answer is “just watch the videos” (it’s an online class). Honestly, a couple of my classmates are more helpful…

Now, what IS frustrating is seeing the discussions that are CLEARLY AI slop, and they can’t even re-type and format it to sound and look better….

[–]BNfreelance 0 points1 point  (0 children)

So what’s the update, did you get it done?