The best way to write HTML code is to use tags in a stacked structure. Do not write anything until an open tag is properly closed. other questions: html code kaise likhte hai webpage kaise banaye webpage kaise design kare
<html>
<head>
<title>My Page</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body>
<a onclick="nav()"><i class=" navBtn fa fa-bars"></i></a>
<nav id="nav">
<a>Home</a>
<a>News</a>
<a>Contact</a>
<a>About</a>
</nav>
</body>
</html>