0
Why my code is not link with the other file page 2
<!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <h1>Welcome to My House</h1> <hr> <p>Welcome To My House. My name is <b>Alpha</b> and i am a <i>engineering student</i> in college <u>XYZ</u> </p> <hr> <h2>Shopping list</h2> <ul> <li>Milk</li> <li>Biscuit</li> <li>Tea</li> <li>Cake</li> <hr> </ol> <hr> <a href="https://www.google.com" target="_blank">Google</a> <a href="page2.html">Page 2</a> </body> </html>
11 Answers
+ 2
Hamza Ahmad
Your files should be in same folder as index.html or page2.html is not in any subfolder.
If you are talking on Sololearn then you can't work with multiple files.
+ 2
Try in vs code
+ 2
Instead of closing the <ul> with </ul> you closed using an </ol> ordered list
+ 1
Aerith <hr> doesnt need to be closed since its an empty tag
and also link is a tag, href is an attribute
link and script is used to link code
while <a> tag is used to create a hyperlink
dont spread misinformation
0
You not close the tag <hr>
Close the tag via "/" and run the code..
Adjust the tag ending and run the code.....
0
Here is my page 2 code
<!DOCTYPE html>
<html>
<head>
<title>Page2</title>
</head>
<body>
<h1>Page 2</h1>
<a href="index.html">Home</a>
</body>
</html>
0
You have to link the code via link function .... href function is used for linking the website with the code.....
0
I have added href but it still not working
0
Hamza Ahmad What kind of file to connect?
0
I have my phone only
I don't have pc
0
Yeah,,,, and you can use vs code