Skip to main content
barzzeb49197134
Known Participant
May 27, 2016
Answered

Creating the links...help

  • May 27, 2016
  • 3 replies
  • 1954 views

First I create the link with the word with a line under them example, but I have no clue of how to link one page to another. I use programmers notepad.

This topic has been closed for replies.
Correct answer Joseph Labrecque

Okay - so if you have index.html and page2.html and want a link on index.html to take the user to page2.hrml - just use an achor tag with an href attribute:

<a href="page2.html">go to page 2</a>

3 replies

barzzeb49197134
Known Participant
May 31, 2016

This is how I set up my html coding for every page. So where should I put the links?

html
<head>
<title>This is your title</title>
</head>        

<body>
<h1>Heading</h1>        
<p>This is the paragraph text</p>
</body>

</html>          
  
 

Jon Fritz
Community Expert
Community Expert
May 31, 2016

barzzeb49197134 wrote:

This is how I set up my html coding for every page. So where should I put the links?

html
<head>
<title>This is your title</title>
</head>

<body>
<h1>Heading</h1>
<p>This is the paragraph text</p>

<p><a href="file.html" alt="">This is a link</a></p>
</body>

</html>


In the above, the second paragraph with the words "This is a link" will be a link to a file called file.html.

To create the link to file.html...

1. From Design View (also available from Live View in the latest versions), highlight the text you want to use as a link

2. In the Properties Window (Window > Properties or Ctrl + F3 if it's not open) click the HTML button on the far left

3. In the Link field, enter the file path of the file you want to link to...

3a. ...or click the Point to File (crosshair icon) and drag it to the file in your Files window

3b. ...or click the Browse For File (folder icon) and browse to a location within your defined site

barzzeb49197134
Known Participant
May 31, 2016

I am using programmers notepad.

Joseph Labrecque
Community Expert
Community Expert
May 27, 2016

Too long

I'm not quite sure what you are trying to do based on the description though. You can just rename the links you have on each page and the href attributes as well for various locations. I'm assuming this is a static set of HTML documents. If using a server-side language or something like Angular, you can use includes for a nav or some templating system to make things cleaner.

But if just a static site - it should be rather simple as described.

Joseph Labrecque
Community Expert
Community Expert
May 27, 2016

Hi. Can you provide some more information on what you are trying to do? What languages/frameworks are you dealing with?

barzzeb49197134
Known Participant
May 27, 2016

I have create the index page or home page and I mention that I did create a link that gives me a line under the word, but I want to be able to link other pages to each other. I am doing the code in html.

Joseph Labrecque
Community Expert
Joseph LabrecqueCommunity ExpertCorrect answer
Community Expert
May 27, 2016

Okay - so if you have index.html and page2.html and want a link on index.html to take the user to page2.hrml - just use an achor tag with an href attribute:

<a href="page2.html">go to page 2</a>