

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
HTML Links
The HTML Links are hyperlinks that means when you click on a link, it jump son another document.
Syntax
Following is the syntax −
<a href=”URL” target=”value” >Link Content</a>
Here URL specifies the destination address and it can be either local or external address. target attribute defines where to open the linked document and it can take the following values:
Value | Explanation |
---|---|
_blank | It opens the linked document in a new tab or window. |
_parent | It opens the linked document in the parent frame. |
_self | It opens the linked document in the same window. |
_top | It opens the linked document in the full body of the window. |
Example
Let us see an example of HTML Links −
<!DOCTYPE html> <html> <style> body { color: #000; height: 100vh; background-color: #8BC6EC; background-image: linear-gradient(135deg, #8BC6EC 0%, #9599E2 100%); text-align: center; } </style> <body> <h1>HTML Links Demo</h1> <a href="https://google.com" target="_blank">Go To Google</a> </body> </html>
Output
Now click on “Go To Google” link to open google link in a new window.
- Related Questions & Answers
- HTML DOM links Collection
- How to make page links in HTML Page?
- How to change the color of links in HTML?
- Customize links using disabled class for unclickable links
- What are bad links?
- Styling Links with CSS
- How to find all the links matching specific URL in an HTML page?
- Set disabled links with Bootstrap
- Styling Links Working with CSS
- How to add a base URL for all the links in a page in HTML?
- Style all visited links with CSS
- Style all unvisited links with CSS
- Non-Nav (standard) links in Bootstrap
- Get links in alerts with Bootstrap
- Set the Color of links with CSS
Advertisements