webdevlinux - logo Web Dev Linux

HTML Links

We use HTML links to switch between web pages. In this chapter, you will understand how to make navigations with HTML.

HTML Links Links

Try the below example

FILE : links.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>HTML Links</title>
</head>
<body>
<nav>
	<ul>
		<li><a href="start.html">Quick Start HTML</a></li>
		<li><a href="paragraphs.html" target="_blank">Paragraphs</a></li>
		<li><a href="http://www.webdevlinux.com">Go WDL</a></li>
	</ul>
</nav>
</body>
</html>

Explanation

Take a look at the explanation of elements & attributes used in the example.

<nav></nav>
The nav element represents a section with navigation links.
<a></a>
The a element represents an HTML link. This represents a hyperlink when the href attribute specified.
href="start.html"
The href attribute is used to define hyperlinks. The attribute value represents the destination address.
target="_blank"
The target attribute represent where the link should open. With the value _blank, the link will open in a blank tab in the web browser.