
- HTML Tutorial
- HTML - Home
- HTML - Overview
- HTML - Basic Tags
- HTML - Elements
- HTML - Attributes
- HTML - Formatting
- HTML - Phrase Tags
- HTML - Meta Tags
- HTML - Comments
- HTML - Images
- HTML - Tables
- HTML - Lists
- HTML - Text Links
- HTML - Image Links
- HTML - Email Links
- HTML - Frames
- HTML - Iframes
- HTML - Blocks
- HTML - Backgrounds
- HTML - Colors
- HTML - Fonts
- HTML - Forms
- HTML - Embed Multimedia
- HTML - Marquees
- HTML - Header
- HTML - Style Sheet
- HTML - Javascript
- HTML - Layouts
- HTML References
- HTML - Tags Reference
- HTML - Attributes Reference
- HTML - Events Reference
- HTML - Fonts Reference
- HTML - ASCII Codes
- ASCII Table Lookup
- HTML - Color Names
- HTML - Entities
- HTML - Fonts Ref
- HTML - Events Ref
- MIME Media Types
- HTML - URL Encoding
- Language ISO Codes
- HTML - Character Encodings
- HTML - Deprecated Tags
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>
- Related Articles
- How to create a bookmark link in HTML?
- How to create a link to send email in HTML?
- How to create a download link with HTML?
- How to create an HTML Document?
- How to link a submit button to another webpage using HTML?
- How to create HTML link that doesnt follow the link?
- How to create a section in a document in HTML?
- How to create a Hyperlink using JavaFX?
- How to create a link to send email with a subject in HTML?
- How to Insert Hyperlink in HTML Page?
- How to create a valid HTML document with no element?
- How to create hyperlink in a Tkinter Text widget?
- How to create a hyperlink with a Label in Tkinter?
- How to create a valid HTML document with no and element?
- Click hyperlink in Excel to go to a specific page in Word document

Advertisements