Edit This Code:
<!DOCTYPE html>
<html>
<title>W3.CSS</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../lib/w3.css">
<body>

<nav class="w3-sidenav w3-light-grey" style="width:25%">
  <a href="tryit.asp-filename=tryw3css_sidenav_hover_text.html#">Default</a>
  <a class="w3-hover-none" href="tryit.asp-filename=tryw3css_sidenav_hover_text.html#">None</a>
  <a class="w3-hover-none w3-hover-text-red" href="tryit.asp-filename=tryw3css_sidenav_hover_text.html#">Red Text</a>
  <a class="w3-hover-none w3-hover-text-teal" href="tryit.asp-filename=tryw3css_sidenav_hover_text.html#">Teal Text</a>
  <a class="w3-hover-none w3-hover-text-grey" href="tryit.asp-filename=tryw3css_sidenav_hover_text.html#">Grey Text</a>
  <a class="w3-hover-none w3-hover-text-orange" href="tryit.asp-filename=tryw3css_sidenav_hover_text.html#">Orange Text</a>
  <a class="w3-hover-none w3-hover-text-blue" href="tryit.asp-filename=tryw3css_sidenav_hover_text.html#">Blue Text</a>
</nav>

<div style="margin-left:25%">

<header class="w3-container w3-dark-grey">
  <h1>My Header</h1>
</header>

<div class="w3-container">
  <p>When you mouse over the links inside the side navigation, the background color will change to grey by default.</p>
  <p>You can turn off the default hover effect with the w3-hover-none class, and use the w3-hover-text-color if you only want to highlight the text color on hover (and not the background color).</p>
</div>

</div>
      
</body>
</html>


Result:
Try it Yourself - © w3schools.com
Privacy Policy