what's wrong with the code? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

what's wrong with the code?

first day of html I need help lol it shows nothing <html> <body> <h>click for bruh</h> <title>bruh moment</title> <a href="https://youtu.be/2ZIpFytCSVc"> click for bruh </a> <h>click for bruh</h> </body> </html>

21st Mar 2020, 1:24 AM
Pell
Pell - avatar
23 Answers
+ 2
Pell nice but you need to type the h1 in the body tags. Here is the good code. I have change a few things. And here you can see how embed works! https://code.sololearn.com/W70xOaK9a0b1/?ref=app
22nd Mar 2020, 12:47 PM
0xM4hm0ud
0xM4hm0ud - avatar
+ 6
correct⤵️ <html> <head> <title>bruh moment</title> </head> <body> <h1>click for bruh</h1> <a href="https://youtu.be/2ZIpFytCSVc"> click for bruh </a> <h2>click for bruh</h2> </body> </html>
21st Mar 2020, 8:46 AM
Sepehr Hariri
Sepehr Hariri - avatar
+ 3
title should be in <head> no <h>, there is <h1> to <h6> don't put content in <a>, only href
21st Mar 2020, 1:26 AM
Gordon
Gordon - avatar
+ 3
i overlooked, sorry https://code.sololearn.com/WqjSa5l2uix8/?ref=app is this what you want achieve?
21st Mar 2020, 1:29 AM
Gordon
Gordon - avatar
+ 2
<html> <head> <title> Bruh Moment </title> </head> <body> <h1>Click for bruh</h1> <a href="https://youtu.be/2ZlpFytCSVc">Click for bruh</a> <h2>click for bruh</h2> </body> </html> This is the correct one. You can also use this for the font size of the text: <h1> <h2> <h3> <h4> <h5> <h6> Or you can change the font size in css like: h1{ font-size: (you can use px, em, rem, %) } If you want embed a video you can use <iframe> If you want it open on a new page you can use <a> If you want it open in the browser you can use this in the <a> tag: <a href:"..." target:"_blank"> I hope this helped you. 👍
22nd Mar 2020, 10:20 AM
0xM4hm0ud
0xM4hm0ud - avatar
+ 2
Thank you all! I managed to make the code work. https://code.sololearn.com/WFHld45FK3HX/?ref=app
22nd Mar 2020, 12:00 PM
Pell
Pell - avatar
+ 2
Nakul first day of html...
22nd Mar 2020, 6:36 PM
Pell
Pell - avatar
+ 2
First finish the course okay
22nd Mar 2020, 6:38 PM
Nature of me
Nature of me - avatar
+ 1
ok
21st Mar 2020, 1:51 AM
Pell
Pell - avatar
+ 1
There's no <head> tag
21st Mar 2020, 12:28 PM
🥞OlAd46kA
🥞OlAd46kA - avatar
+ 1
lot's of mistakes just rewrite your code use <h1> instade of <h>
22nd Mar 2020, 5:31 AM
Deepak Jaiswar
Deepak Jaiswar - avatar
+ 1
Mahmoud Thank you so much!!!
22nd Mar 2020, 1:15 PM
Pell
Pell - avatar
+ 1
First title can not be written in body <html> <head> <title> bruh moment </title> </head> <body> <a href="https://youtu.be/2ZlpFtCsVc"> click for </a> <h1>click for bruh</h1> </body> </html>
22nd Mar 2020, 6:29 PM
Nature of me
Nature of me - avatar
0
I dont get the 'dont put content in <a> only href' part
21st Mar 2020, 1:28 AM
Pell
Pell - avatar
0
yeah but no output showing
21st Mar 2020, 1:30 AM
Pell
Pell - avatar
0
heres what I have <html> <h1>click for bruh</h1> <head> <title>bruh moment</title> </head> <body> <a href="https://youtu.be/2ZIpFytCSVc"> click for bruh </a> <h>click for bruh</h> </body> </html>
21st Mar 2020, 1:31 AM
Pell
Pell - avatar
0
I want a site where theres a hyperlink taking you to bruh moment
21st Mar 2020, 1:34 AM
Pell
Pell - avatar
0
It already is a hyperlink, linking to the YouTube video. If you want to embed the youtube video in HTML, use iframe.
21st Mar 2020, 4:15 AM
Gordon
Gordon - avatar
0
Pell if you want to embed any site into your site the best tag to use is. <iframe src=""><\iframe> Because i heard you talk about displaying something with the <a> tag..
21st Mar 2020, 9:01 PM
ugochukwu Joseph
ugochukwu Joseph - avatar
0
Pell you welcome👌
22nd Mar 2020, 1:19 PM
0xM4hm0ud
0xM4hm0ud - avatar