The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> HREF tags in HTML5
Volactic
post Feb 2 2016, 07:16 PM
Post #1





Group: Members
Posts: 1
Joined: 2-February 16
Member No.: 23,953



So I am having trouble with my HTML tags. So I will explain.

Imagine this.


1. You have a folder called Website.
2. Inside that folder you have index.html and a folder called file
3. Inside the file folder you have a file called page1.html
4. Inside of page.html you have this code \/

<!DOCTYPE html>

<html lang="en">

<head>
<title>Page1</title>
</head>

<body>

<a href="index.html">Home</a>
<a href="page1.html">Page1</a>

</body>

</html>



5. Inside index.html you have this code \/
<!DOCTYPE html>

<html lang="en">

<head>
<title>Website</title>
</head>

<body>

<a href="index.html">Home</a>
<a href="page1.html">Page1</a>

</body>

</html>



6. And I wont to be able to go back and forth between the 2 pages by clicking on the links. Dose anyone know how to do that? If you do, lease tell me.

This post has been edited by Volactic: Feb 2 2016, 07:20 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Feb 2 2016, 07:26 PM
Post #2


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,733
Joined: 9-August 06
Member No.: 6



In both cases you have linked to files in the same folder as the current HTML file.

To go one folder down you need to include the folder name followed by a slash:
CODE
file/page1.html

To go one folder up you use two dots followed by a slash:
CODE
../index.html


Read all about it here:
http://htmlhelp.com/faq/html/basics.html#relative-url
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Feb 8 2016, 01:20 PM
Post #3


.
********

Group: WDG Moderators
Posts: 9,661
Joined: 10-August 06
Member No.: 7



Off-topic post moved here: http://forums.htmlhelp.com/index.php?showtopic=43619
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
coothead
post Jan 25 2024, 10:57 AM
Post #4


Advanced Member
****

Group: Members
Posts: 206
Joined: 12-January 23
From: chertsey, a small town 25 miles south west of london, england
Member No.: 28,743



Hi there sarika78,

Please note that "href" is not an element IPB Image - it is an attribute IPB Image

Here is a little further reading for your edification....

MDN - the href attribute


coothead

This post has been edited by coothead: Jan 25 2024, 10:59 AM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jan 25 2024, 11:25 AM
Post #5


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,733
Joined: 9-August 06
Member No.: 6



The post you answered contained spam and was removed. In case you wonder where it went. happy.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
coothead
post Jan 25 2024, 12:09 PM
Post #6


Advanced Member
****

Group: Members
Posts: 206
Joined: 12-January 23
From: chertsey, a small town 25 miles south west of london, england
Member No.: 28,743



QUOTE(pandy @ Jan 25 2024, 05:25 PM) *


The post you answered contained spam and was removed.
In case you wonder where it went. happy.gif



I had a sneaky suspicion that was the case but, unfortunately,
I had an uncontrollable urge to make a flippant response. IPB Image


coothead

This post has been edited by coothead: Jan 25 2024, 12:11 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 27th April 2024 - 02:08 PM