Having trouble with the href attribute not properly redirecting to a different page

I am trying to create a hyperlink for an option that will take users to another page. All the other options on the page lead to different sections within the same page. When I add

  • CONTACT
  • , it doesn't work. All the files are in the same folder, so I don't think it's a root issue. Could this be related to CSS? How can I resolve this?

    LINK SOLUTIONS-->
  • HOME
  • ABOUT
  • SERVICE
  • PORTFOLIO
  • CONTACT
  • Answer №1

    If you are using HTML, please follow this syntax:

    <ul>
      <li><a href="">HOME</a></li>
      <li><a href="/about.html">ABOUT</a></li>
      <li><a href="/service.html">SERVICE</a></li>
      <li><a href="/portfolio.html">PORTFOLIO</a></li>
      <li><a href="/contact.html">CONTACT</a></li>
    </ul>
    

    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

    Display a pop-up window upon clicking anywhere on the webpage using jQuery and HTML

    Is it possible for me to create a pop-up window that opens a specific website when a user clicks anywhere on the page, similar to pop-up companies? Can this be achieved using HTML, JavaScript, and jQuery? Any help would be greatly appreciated. ...

    Tips for maintaining sequential numbering in Mediawiki sections

    Looking to enhance the formatting of numbered lists by adding section headers and restarting numbering? The old Mediawiki format supported this, but it no longer works in version 1.24. For example: ==First Header2== # # ==Second Header2== # Desired output ...

    What is the best way to isolate particular components of an argument and store them in separate variables?

    Currently, I am facing a challenge in extracting the name and id of an emoji from a discord argument using discord.js. The input provided to me is <:hack_wump:670702611627769876>, and my goal is to retrieve var id = '670702611627769876' alo ...

    Displaying information from a database in an HTML form using PHP

    Seeking assistance with managing data and populating: I'm in the process of creating an Employee database with two pages: 1. Add Employee 2. Modify Employee The "Add Employee" page requires input fields for EMP Name, EMP ID, Manager name (from a dro ...

    Conditional statement in Javascript for document.cookie

    I am attempting to create a basic if statement that relies on the value of a cookie. The function looks like this: function setHomePage() { if ($.cookie('settingOne') == 'jjj') { $('.secO').css('display', & ...

    When I scroll and update my webpage, the navigation header tends to lose its distinct features. This issue can be resolved

    When I scroll, my navigation header changes from being transparent to having a solid color, and this feature works perfectly. However, whenever I refresh the page while already halfway down, the properties of my navigation header are reset and it reverts ...

    Aligning text in the middle of a div vertically

    Visit the Satoshi Faucet Index here I'm attempting to vertically align the text within the four divs containing sat, bit, mBTC, and BTC. I have tried using display:table-cell; vertical-align:middle; on the divs but unfortunately it isn't havi ...

    Incorporate a prefix into the URL of Angular development servers

    When our application is in production, it will not be served from the root. Instead, it will be served from something like https://ourdomain.com/ourapp. This setup is causing problems with image URLs. To work around this issue, I am trying to serve the ap ...

    Success/Fail Page for Form Redirect

    I've been struggling to figure out how to redirect my form to a success or fail page. I've scoured the internet for solutions, looking into traditional form redirects and even JavaScript onClick redirects. Can someone guide me on adding a redirec ...

    Hiding labels using JQuery cannot be concealed

    Why isn't this working? -_- The alert is showing, but nothing else happens. <asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeaderContent"> <script type="text/javascript"> if (navigator.userA ...

    Is the JSON data not matching the file's content during validation?

    After thorough testing, my JSON data appears to be functioning correctly with regular content. Here is a sample of the working JSON: Working Json { "language": "XYZ", "content": { "GEN": "this is test& ...

    Creating test cases for a third-party CLI package

    I have successfully created a command-line interface (CLI) program using yargs. I have managed to cover test cases for all the functions exported by the application. However, there seems to be a gap in the test coverage from lines 12-18. Can you provide i ...

    What is the proper way to implement a try/catch block when establishing a MongoDB connection?

    I am trying to verify the connection status of my MongoDB database. If the connection is down, I want to receive an email notification. Unfortunately, I am struggling with understanding how to implement the try/catch functionality in JavaScript as I am sti ...

    My data is not appearing with ng-repeat or ng-bind

    One issue I am encountering is that my ng-repeat / ng-bind is not displaying the data within $scope.articles, even though I am getting the expected data in the console. To help identify the problem more easily, I have created a code snippet below: var A ...

    Creating a dropdown menu that seamlessly populates elements without any empty spaces

    My team at the company is using a menu created by another developer. I recently added a dropdown selection to the first item on the menu, but I've run into an issue where the dropdown box does not fully fill the item, and I can't seem to fix it. ...

    The conversion from JSON to a PHP API is facing obstacles

    I'm having an issue with saving data when a button is clicked using Javascript and PHP. Button click: var xhr = new XMLHttpRequest(); var url = "savedata.php"; xhr.open("POST", url, true); xhr.setReque ...

    Analyzing JSON information using an AJAX request from a local file

    I have a PHP file on a web server that is executing queries to a MySQL database. Currently, I am testing a site on my local PC which utilizes a JS file with AJAX requests to retrieve JSON data from the mentioned PHP file. My question is whether it is fea ...

    What is the best way to flip cards with the onClick event in JavaScript?

    My cards are currently facing down with the code* provided. What steps should I take to flip them face up using onClick functions? Furthermore, how can I store the IDs in an Array and use them to retrieve images from my image collection? HTML <table s ...

    What is the best way to create a more compact Select component in React?

    Working on React's Select component has been quite the challenge for me. I'm in the process of creating a simple dropdown button, also known as a ComboBox, similar to what can be seen on GitHub Insights: https://i.stack.imgur.com/J9Bcd.png Belo ...

    Max value determined by a variable within a for loop

    UPDATE: Revised code provided. In my Node.js JavaScript project, I am creating a script to iterate through a dataset obtained by web scraping. The main goal of this algorithm is: 1) Examine the player table for the presence of the player's name in a ...