![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to create a hyperlink to link another document in HTML?
Use the <a> tag to create a hyperlink. The HTML <a> tag is used for creating a hyperlink either to another document, or somewhere within the current document.
The following are the attributes −
Attribute | Value | Description |
---|---|---|
Charset | character_encoding | Defines the character encoding of the linked document. |
Cords | if shape = "rect" then coords = "left, top, right, bottom" | Specifies the coordinates appropriate to the shape attribute to define a region of an image for image maps. |
download![]() | filename | |
Href | URL | Specifies the URL of a page or the name of the anchor that the link goes to. |
Hreflang | language_code | Language code of the destination URL. |
media![]() | media_query | It specifies what media the linked document is optimized for |
Name | section name | Marks an area of the page that a link jumps to. |
Rel | alternate designates stylesheet start next prev contents index glossary copyright chapter section subsection appendix help bookmark | Describes the relationship between the current document and the destination URI |
Rev | alternate designates stylesheet start next prev contents index glossary copyright chapter section subsection appendix help bookmark | Specifies the relationship between the target URL and the current document |
Shape | rect rectangle circ circle poly polygon | Where to open the target URL. _blank - the target URL will open in a new window. _self - the target URL will open in the same frame as it was clicked. _parent - the target URL will open in the parent frameset. _top - the target URL will open in the full body of the window. |
type![]() | mime_type | Specifies the MIME (Multipurpose Internet Mail Extensions) type of the target URL |
Example
You can try to run the following code to create a link −
<!DOCTYPE html> <html> <head> <title>HTML a Tag</title> </head> <body> <p>This is a link to <a href = "https://qries.com">Qries.com</a></p> </body> </html>
Advertisements