The HTML link is not functioning properly. I included the code "<a href="fileName"></a>" but the link is not working

My hyperlink isn't functioning properly in my HTML code, and I can't determine the reason why.

<div class="banner-text">
    <ul>
                <li><h3><a href="chawla.html">HOME</a></h3></li>
                </li><h3><a href="about.html">ABOUT US</a></h3></li>
                </li><h3><a href="cont.html">CONTACT</a></h3></li>
                </li><h3><a href="stud.html">STUDENT's CORNER</a></h3></li>
    </ul>
    <h1 class="big">CHAWLA CLASSES</h1>
</div>

Answer №1

Make sure to validate your code using a validator tool.

Remember, only <li> elements can be direct children of <ul> elements.

Ensure that the links are placed inside the list items and not the other way around.


Additional Points:

  • Use level 3 heading elements for actual headings instead of placing headings within list items. Apply CSS for styling list items.
  • When using all caps, consider that screen readers will spell out each letter individually. To visually display text in capital letters, utilize the CSS text-transform property.

Answer №2

You might want to consider making the following changes:

<ul>
  <li> <a href="chawla.html">Home</a> </li>
   <li> <a href="about.html">About Us</a> </li>
  <li> <a href="cont.html">Contact</a> </li>
  <li> <a href="stud.html">Student's Corner</a> </li>
</ul>

UPDATE: After double-checking, it seems that the changes have been successfully implemented. Here are a couple of screenshots for reference:

1

2

Answer №3

Insert the anchor tag within the <li> element. If it's not functioning, access the developer console to troubleshoot.

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

Fill Dropdown Menu Using Data Retrieval From Database

I am trying to figure out how to populate a drop down list (also known as a Select element) with data from a SQL Server query. The goal is to fill the list with results from Select storeName from storeinfo, which should give around 30 items that I want di ...

Replicate the contents of one DIV element into a different DIV

I am in need of assistance with cloning a DIV in order to prevent data duplication. This is something I frequently need to do across several pages and I don't want to make major structural changes. My goal is to clone the mApageLeft DIV with the clas ...

Firefox and Safari experiencing issues with Flexbox padding at the bottom

While scrolling down the .parent div, you should notice that its red background appears at the bottom due to the padding-bottom property. Interestingly, this effect is visible in Chrome but not in Safari and Firefox. .container { display: flex; widt ...

How can we use jQuery to change the format of a

I'm working on a project where I want the calendar to display the date that the user picks. Right now, my "{{date}}" is in the format 2016-01-11, but it keeps showing one day before the selected date. I would like it to display as mm/dd/yyyy. I belie ...

Is it possible to switch the background image when hovering?

Is the image proportion relevant to the issue at hand? <style> .img1:hover { background-image: url({%static 'images/img2.gif' %}); -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; backg ...

Refine your search by focusing on select characteristics of an item

Is there a way to filter tasks in a table using only specific attributes provided in the table? Currently, when I enter a search term in the search bar, tasks are displayed even if they have attributes that match the input but are not displayed in the na ...

What is the best way to bind data to a textarea component and keep it updated?

I started using VueJS just a week ago for a new project. During this time, I have successfully created two components: * Account.vue (Parent) <!--This snippet is just a small part of the code--> <e-textarea title="Additional Information" ...

Error message: 'html' is not a defined data type in jQuery Ajax

Having some trouble with my jQuery ajax code while working on it in Firebug. I keep getting a ReferenceError: jQuery(document).ready(function() { jQuery('.my-div').click(function(e){ e.preventDefault(); var href = jQuery(this).attr(& ...

history.js - failure to save the first page in browsing history

I have implemented the history.js library to enable backward and forward browser navigation on an AJAX products page triggered by clicking on product categories. While I have managed to get this functionality working smoothly, I am facing a particular iss ...

Placing a pair of labels onto a bootstrap form while ensuring column alignment

I'm trying to format a form according to my UI/UX specifications, where there is a parent label and two sub-labels. Can this be achieved using Bootstrap? https://i.stack.imgur.com/J8wJZ.png However, I'm struggling to align the columns and rows ...

mandatory data fields for an HTML form

I'm having some trouble creating an HTML form with mandatory input fields. The code I have so far is shown below: <div class="col-sm-6"> <label for="city" class="form-control">City ...

Unable to modify variable to play audio

As I work on constructing my website, I am incorporating various sounds to enhance user experience when interacting with buttons and other elements. However, managing multiple audio files has proven challenging, as overlapping sounds often result in no aud ...

Rectify the functionality of collapsing and expanding sections

I am utilizing the bootstrap 4 alpha 6 version in my project. On my page, I have multiple blocks that I would like to expand/collapse by clicking on a main button (with the id of 'expand-collapse'). Additionally, each block has its own individual ...

What's the best way to compare a database date with the current date using Bootstrap?

I have a Bootstrap Laravel page where I need to compare the database date with the current date. If it is less than 1 day, I want to add a class. @elseif( ($order->order_date, strtotime('now - 1day')) < date('yy-m-d') ) ...

Submitting a form and using Ajax to upload an image

Is there a way to submit an image file to php using ajax without assigning the file to a variable with onchange event? I've tried triggering the request on submit click, but keep getting the error message: "cannot read property 0 of undefined." <ht ...

What could be causing the TailWind CSS Toggle to malfunction on my local server?

While working on designing a sidebar for a ToDo page using Tailwind CSS, I encountered an issue with implementing a toggle button for switching between dark mode and light mode. In order to achieve this functionality, I borrowed the toggling code snippet f ...

Tips for overriding a CSS class without impacting other classes sharing the same name

Within a page filled with various widgets, I am facing an issue where I need to override the container class for a specific widget. However, the problem is that all widgets with the same class name are being impacted. Attached below is a screenshot from in ...

Elevate your Material UI experience by setting a maximum height for TableBody and enabling vertical scrolling for a seamless

I'm looking to utilize Material UI to set a maximum height of 500px for the TableBody within my Table. If there are rows that exceed this height, I want the TableBody to scroll vertically while keeping the TableHead fixed in place. https://i.sstatic. ...

How can I use HTML and Javascript to toggle the visibility of a 'select' element, like a dropdown menu

After adding a dropdown and label within a div, I expected them to hide and unhide when the div is manipulated with a function. However, it seems that this functionality is not working as expected. function ToggleDiv(DivID) { if (document.getElementBy ...

trouble with overlapping mdl-sheet instances

Hey there! I have a quick question - Is it possible to have multiple mdl-sheets on one page that all share the same form? I tried implementing this but ended up with them overlapping each other instead of displaying next to each other from left to right. ...