Connections while posting

Hello, I am new to web design and have a question about my site links. Currently, my links are as follows:

<li id="active"><a href="Index.html">Home</a></li> 

<li><a href="Lakes.html">Where to Fish</a></li>

<li><a href="specimenfish.html">Specimen Fish</a></li>

<li><a href="gallery.html">Gallery</a></li>

<li><a href="Prebait.html">Pre Bait</a></li>

Do I need to change them to include the site name .com when uploading to a hosting site? For example:

<li><a href="www.sitename.com/Lakes.html">Where to Fish</a></li>

I also have a question regarding Specimen Fish. Can someone help me with that?

Thank you for your assistance!

Answer №1

no need to modify them if they are located in the same directory

same directory

<code><li><a href="Lakes.html">Where to Fish</a></li>

next directory

<code><li><a href="folder_name/Lakes.html">Where to Fish</a></li>

one directory up

<code><li><a href="../Lakes.html">Where to Fish</a></li>

within a directory that is one directory up

<code><li><a href="../folder_name/Lakes.html">Where to Fish</a></li>

direct URL (if you want to link to a file from a specific folder on your server and it's too complicated to achieve with the previous examples - or if you want to link to a file from another server)

<code><li><a href="http://www.servername.com/folder/Lakes.html">Where to Fish</a></li>

I hope this information proves helpful for you

Answer №2

If your links (gallery.html, prebait.html, etc.) are located in the same folder as the file that contains them, then you're good to go. This is known as a relative URL - there's no need to provide the full URL; you're simply moving around based on a common parent directory.

Answer №3

To ensure proper linking, it is important to start with "http://" in the href attribute:

<li><a href="www.sitename.com/Lakes.html">Where to Fish</a></li>

should be corrected to:

<li><a href="http://www.sitename.com/Lakes.html">Where to Fish</a></li>

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What could be causing the misalignment of my select box in Bootstrap framework?

I'm currently trying to replicate the layout of the second image shown below, as seen in the first image. However, I'm facing an issue with the positioning of the selection box and I can't seem to figure out why. I've experimented wit ...

The HTML object is experiencing difficulties with the Ajax page loader feature not functioning as

I attempted to use the code below in order to show an Ajax loader image while the page loads into an HTML object. Unfortunately, it didn't work as expected and I'm having trouble figuring out why. Everything seems to be functioning correctly exce ...

Tips on aligning two bootstrap columns side by side

Having trouble aligning my two columns side by side. Despite my efforts, the second column (col-11) keeps appearing below col-1. The image inside col-1 should be on the far left with the other column right next to it. <div class="container col-md-12 wm ...

Is there a way I can alter the font style of the word 'Logout'?

Hey, does anyone have a solution for changing the text color of "Logout!" to white? echo "Welcome, ".$_SESSION['username']."!<br><a href='logout.php'>Logout!"; <font color="#ffffff">your answer</font> ...

Struggling to make addClass and removeClass function correctly for the development of the unique "15 puzzle" game

I am currently in the process of creating a version of "the 15 game" using jQuery in HTML. You can find more information about the game on this page. The objective of the game is to rearrange a table of "boxes" in ascending order from 1 to 15. Below is th ...

Ways to manage the gap among flex items

I'm currently going through some educational material on Codeacademy, and I'm curious about how I can control the spacing between the "locations" text and the three divs below it. The task requires me to create a 15px gap between them, but I am u ...

How can I add a drop shadow effect to just two sides of a <div> element? Maybe using CSS3 gradients and border images for a unique look

I am attempting to achieve an effect where a div appears to fade into the background of the content. The concept involves having a simple border: 1px #000 solid; on the top and bottom of the div, along with a large inset shadow on the left and right sides ...

Crafting a custom React Native button component with an asymmetrical design

I am trying to design a unique custom react native button that is slanted on one side. Despite reading numerous articles, I haven't found a solution that meets my specific requirements. Below are examples of how I would like the buttons to look – on ...

What could be causing the issue of node-sass generated CSS files not loading on the initial GET request?

I've set up a node express app and incorporated sass support for the CSS. However, when I attempt to access http://myhost.com:port/css/whatever.css, the whatever.css file is generated in the express_app_root/public/css directory as expected. The *.scs ...

Tips for utilizing the not CSS selector in your stylesheet without the asterisk

My challenge lies here: I am facing an issue with my External Style Sheet where the "*" selector is defined as follows: * { margin: 0em 4.2em 0em 0em; padding: 0em; } The problem arises when I have a tree view control in my aspx page. The above selector ...

Position a DIV element without specifying the width dimension

Possible Duplicate: How can I center something if I don't know ahead of time what the width is? I am seeking guidance on aligning a div element without prior knowledge of its width. My approach differs from previous inquiries as I am open to usin ...

jQuery modal window extension

Currently, I am utilizing a jQuery popup plugin that opens a popup window using the anchor's href. For example: <a href="/some/site?hello=hi" class="popup">link</a> There could be an unlimited number of these on my page, each pointing to ...

When text is added to div elements, they are mysteriously pushed downward. This strange phenomenon occurs with inline-block elements

Why does the first element get pushed down when its child contains text? What causes inline-block to behave this way? Is there a way to align divs side-by-side while still allowing them to have children? For example, I want the grey box to contain a list ...

What is the best way to utilize document.body in order to add a table to a designated DIV?

Once I make a copy of the table, my goal is to insert this new table into a designated DIV named div1. How can I add the new table to div1? <div id="div1"> </div> var copiedElement = document.getElementsByTagName("table" ...

Should we still be using <input type="date" /> in 2021?

I've come across some old articles cautioning against using , but they were written a couple of years ago. I'm wondering if it's safe to use in 2021 without negatively impacting the user experience. ...

New to HTML5 and looking to incorporate a Speech-Box feature into my Java program

As a newcomer to HTML, I found myself intrigued by the capabilities of . My question is: how can I trigger the execution of a Java application named HelloWorld with the input String from a text box by either pressing enter or speaking into it? I'm lo ...

I'm curious as to why my form fields disappear even when they have not been selected

Illustration of Form Fields Disappearing When Unselected Greetings, I'm encountering an issue where my form fields disappear when not selected. I'm utilizing Crispy Forms to render the form, following a tutorial on YouTube. This functionality w ...

The remove() function is failing when attempting to add input fields dynamically

Hello, I am currently facing an issue with dynamically generating input fields based on AJAX results. Unfortunately, the .remove() function is not working as expected and my current solution involves repetitive code. Any guidance or assistance would be g ...

Difficulties arise when trying to align text vertically between two floating images

After running the code, I noticed that the text "Text Here" is positioned at the bottom of the div instead of the top. I have attempted to adjust it using properties like vertical-align, padding, and margin-top within the .subText styling, but so far, I ha ...

Is there a way to utilize HTML and CSS to position checkboxes in front of text questions?

I need help with organizing checkboxes and labels in my webform. Currently, the checkboxes are appearing after the label text, causing them to be misaligned. How can I ensure that the checkboxes appear before the corresponding text? <label for="needs ...