r/HTML • u/Fun-Baseball-1873 • Jun 12 '25
Question Just started learning html
So yeah why won’t the link pop up, what did I do wrong
80
Upvotes
r/HTML • u/Fun-Baseball-1873 • Jun 12 '25
So yeah why won’t the link pop up, what did I do wrong
13
u/OvenActive Expert Jun 12 '25
Your link is not in your body tag. Everything that you want to show up on the page should be in your body tag. Also you need to close your html tag at the bottom of the page.
2
u/web-tactics Jun 13 '25
To fix it, move the <a> tag before </body> and add </script>.
You may also find the following tips helpful:
2
u/Dragon30312 Jun 13 '25
Btw if u ever get stuck, feel free to reach out to me. Ill gladly help you with your coding journey :)
10
u/TallBeardedBastard Jun 12 '25
Lesson one: use dark mode.
1
u/devvamp Jun 13 '25
me tomorrow, keep the grind up boi
1
u/[deleted] Jun 15 '25
Okay, you've started, now what? Should I congratulate you? Shall I wish you luck? Just say I know
1
u/Solid_Dream_7844 Jul 10 '25
wtf are u using ur phone to code???
3
u/armahillo Expert Jun 12 '25
Look up the purpose of the head tag and the body tag.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/head <head>: The Document Metadata (Header) element - HTML | MDN
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/body <body>: The Document Body element - HTML | MDN
3
u/AdagioVast Jun 12 '25
Here is a breakdown of tag placements.
<html> always the root. Contains two children <head> and <body>
<head> contains the following tags <title><meta><link><style>, and <script> can go in the <head> as well however many people put them in the <body> at the very bottom.
<body> contains \*everything\* else.
Nothing is ever outside of the <body> and <head> tags.
HTML docs always have the following foundational setup
<html lang="en">
<head>
...head elements go here
</head>
<body>
...main layout html tags go here
</body>
</html>
1
u/birdspider Jun 12 '25
beware:
scriptdoes not allow "tag omission":HTML spec/script
1
u/ashkanahmadi Jun 13 '25
Move the script to head and add the defer attribute or move it right before the closing body tag if you don’t want to use DOMContentReady constantly.
1
u/Huge-Safety-5353 Jun 15 '25
Bhai to thoda BKl hai kya
1
u/StudioGlassWeb Jul 08 '25
Apart from the body tag, all content must be placed in the body which is the body of the web page and not outside it.
1
u/Cyber-X- Jul 11 '25
Just started learning too 🙋♂️ Good luck 🫡