Question regarding HTML/CSS and links.?

SIo

New member
I am creating a simple navigation bar in HTML/CSS and I need to know how to make the link for the page I am on a different color. For example, if my links are all white, and I am on the homepage, I want the Home link to be a different color. I want this based on what page I am on. If I am on the about page, I would like that page link a different color, while the rest stay white.
 
If I remember correctly, there isn't an exact CSS code to do this, but you have to go to the HTML page that you're editing, and in the link section, change the color of the link of the page that you're on.

So say you're on the homepage. Open up the HTML file for the homepage, and find your homepage link in the code. Make it so that it changes color like so:

<a href="yourhomepageurl.html"><font color="yourhexcolor">Your text</font></a>

Of course, I haven't used CSS and HTML since my senior year in high school (Last year). It's easier to just change the color for pages that have been visited already using CSS, IMO.
 
Back
Top