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>

30th Mar 2021, 7:34 AM
Hamza Ahmad
Hamza Ahmad - avatar
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.
30th Mar 2021, 9:04 AM
A͢J
A͢J - avatar
+ 2
Try in vs code
31st Mar 2021, 7:31 AM
Haider ali
Haider ali - avatar
+ 2
Instead of closing the <ul> with </ul> you closed using an </ol> ordered list
1st Apr 2021, 12:37 AM
Andrew Musanyera
Andrew Musanyera - avatar
+ 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
31st Mar 2021, 11:41 AM
Bot
Bot - avatar
0
You not close the tag <hr> Close the tag via "/" and run the code.. Adjust the tag ending and run the code.....
30th Mar 2021, 7:52 AM
Tirthen Patel
Tirthen Patel - avatar
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>
30th Mar 2021, 7:53 AM
Hamza Ahmad
Hamza Ahmad - avatar
0
You have to link the code via link function .... href function is used for linking the website with the code.....
30th Mar 2021, 7:56 AM
Tirthen Patel
Tirthen Patel - avatar
0
I have added href but it still not working
30th Mar 2021, 8:09 AM
Hamza Ahmad
Hamza Ahmad - avatar
0
Hamza Ahmad What kind of file to connect?
30th Mar 2021, 8:19 AM
Matias
Matias - avatar
0
I have my phone only I don't have pc
31st Mar 2021, 9:02 AM
Hamza Ahmad
Hamza Ahmad - avatar
0
Yeah,,,, and you can use vs code
31st Mar 2021, 11:03 PM
blocked