I am encountering a new issue that I have not faced before and I am seeking some guidance on it. The problem is with a navigation bar displayed at the top of a webpage. When the code is executed, the browser automatically adds 'a' tags which disrupt the alignment of my links. I need to figure out how to prevent this unwanted behavior. Below is an example showcasing the code.
Here's My Code:
<nav>
<ul id="LevelMenu">
<?php if($currentuser['userlevel']==0) { ?>
<li><a href="register.html">Register New Account</a></li>
<?php } else {
if($currentuser['userlevel']==1) { ?>
<li><a href="inactive.php">Account Panel<a></li>
<?php } else { ?>
<li><a href="user.php">Account Panel<a></li>
<?php if($currentuser['userlevel']>2) { ?>
<li><a href="admin.php">Administration</a></li>
<?php }
} ?>
<li><a href="php/logout.php">Log Out</a></li>
<li><a href="addarticle.php" id="addarticle">Add Article</a></li>
<?php } ?>
</ul>
</nav>
Code Displayed in Browser:
<nav>
<ul id="LevelMenu">
<li>
<a href="user.php">Account Panel</a>
<a></a>
</li>
<a></a>
<li>
<a></a>
<a href="index.php">Home</a>
</li>
<li>
<a href="admin.php">Administration</a>
</li>
<li>
<a href="index.php">Home</a>
</li>
<li>
<a href="php/logout.php">Log Out</a>
</li>
<li>
<a href="addarticle.php" id="addarticle">Add Article</a>
</li>
</ul>
</nav>