- Trending Categories
- Data Structure
- Operating System
- C Programming
- 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 do we include an anchor in HTML?
59 Lectures 8.5 hours
68 Lectures 8 hours
Use the <a> tag to create an anchor in HTML. The <a> tag is used for creating a hyperlink to either another document or somewhere within the current document.
The following are the attributes −
|Charset||character_encoding||Defines the character encoding of the linked document|
|Cords||if shape = "rect" then coords = "left, top, right, bottom"|
if shape = "circ" then coords = "centerx,centery,radius"
if shape = "poly" then coords = "x1, y1, x2, y2,..,xn,yn"
|Specifies the coordinates appropriate to the shape attribute to define a region of an image for image maps.|
|download||Filename||This downloads the target when user clicks on the hyperlink.|
|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.|
|Describes the relationship between the current document and the destination URI.|
|Specifies the relationship between the target URL and the current document.|
|Specifies the shape of the image map|
|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|
You can try to run the following code to learn how to include an anchor in HTML −
<!DOCTYPE html> <html> <head> <title>HTML a Tag</title> </head> <body> <p>Welcome to <a href = "https://www.qries.com">Qries</a></p> </body> </html>
- How do we include an emphasized text in HTML?
- How do we include an inline sub window in HTML?
- How do we include a section in an HTML document?
- How do we include big text in HTML?
- How do we include a table caption in HTML?
- How do we include attributes for table columns in HTML?
- How do we include the legal number intervals for an input field in HTML?
- How do we include the direction of text display in HTML?
- How to include an acronym in HTML?
- How to include an abbreviation in HTML?
- How do we create an image map in HTML?
- How to include an embedded object in HTML?
- How to include an input field in HTML?
- How do we send an email using HTML forms?
- Include meta data in an HTML document