axmug Posted September 14, 2012 Share Posted September 14, 2012 Hi, I am testing HTML code without any server and it doesn't work. Here is the code: <!DOCTYPE html> <html> <head> <title>Home Page</title> <body> <h1>My site</h1> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec iaculis posuere justo. Nam vel neque. Proin sagittis mauris sit amet nisl. Sed ipsum. Aliquan vitae justo. <h2>Latest projects</h2> Etiam consectetuer, mauris vitae cursus scelerisque, dui turpis dignissim justo, et eusimod enim odio sit amet erat. Aliquam dui ligula, porttitor eu, facilisis vitae, ornare sed, tortor.<br><br> <a href="../Portfolio/index.html">Site Projects</a> <body> </html> <html> <head> <title>Links</title> <body> <h1>Latest projects</h1> <a href="../index.html">Home page</a> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec iaculis posuere justo. Nam vel neque. <h2>Project 1</h2> Etiam consectetuer, mauris vitae cursus scelerisque, dui turpis dignissim justo, et eusimod enim odio sit amet erat.<br><br> <a href="/images/Project1.jpg">Image project 1</a> <h2>Project 2</h2> Etiam consectetuer, mauris vitae cursus scelerisque, dui turpis dignissim justo, et eusimod enim odio sit amet erat.<br><br> <a href="/images/Project2.jpg">Image project 2</a> <body> </html> When I run the Home Page code in Firefox, I can watch all the information correctly, but when I click on Site Projects link Firefox remains in the same page. How can I change to the Links page? I have this one in root folder on my computer and the other one in the Protfolio folder also in my computer. Thanks. Link to comment https://forums.phpfreaks.com/topic/268362-simple-html-code-doesnt-work/ Share on other sites More sharing options...
axmug Posted September 14, 2012 Author Share Posted September 14, 2012 Problem solved. I only changed <a href="../Portfolio/index.html">Site Projects</a> to <a href="/Portfolio/index.html">Site Projects</a> in home site and <a href="/images/Project1.jpg">Image project 1</a> to <a href="../images/Project1.jpg">Image project 1</a> in Links site. I changed the same in Image project 2 link. Link to comment https://forums.phpfreaks.com/topic/268362-simple-html-code-doesnt-work/#findComment-1377831 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.