22 Mar Page links in an HTML Web Page
Links in an HTML web page helps you in linking one page to another. To add a hyperlink, use the <a></a> tag and the href attribute,
1 2 3 |
<a href="">My Link</a> |
Under the above <a> tag, we will add the link,
1 2 3 |
<a href=”https://studyopedia.com/tutorials/computer-networks/”>Computer Networks Tutorial</a> |
The <a>…</a> tag should always come inside <body>…</body> tags.
The below example gives an overview of how to add links to an HTML web page,
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
<!DOCTYPE html> <html> <head> <title>HTML Links Example</title> </head> <body> <h2>Tutorials</h2> <a href="/tutorials/drupal-commerce">Drupal Commerce</a> <a href="/tutorials/prestashop">Prestashop</a> <a href="/tutorials/java">Java</a> <a href="/tutorials/cpp">C++</a> </body> </html> |
The output:
More Examples
- Creating HTML Document
- Creating Headings in HTML web page
- Creating Paragraphs in HTML Web Page
- Inserting Image in HTML
- Add Title in an HTML web page
- How to create horizontal line in HTML Page
- The href attribute in HTML Page
- Image height and width attribute in HTML
- Inserting Hyperlinks on an HTML web page?
- Why head tag is used in HTML?
- How to set background color in HTML?
- How to set font color in HTML
- How to use StyleSheet in HTML
No Comments