HTML Hyperlinks (links)
HTML uses tags <a> to set up hypertext links.
A hyperlink can be a word, a word, or a group of words, or it can be an image that you can click to jump to a new document or to a section of the current document.
The href attribute is used in label <a> to describe the address of the link.
By default, the link will appear in the browser in the following form:
- A link that has not been visited is displayed as a blue font with an underscore
- Visited links appear purple with an underscore
- When you click on a link, the link appears red with an underscore
HTML link Syntax
The linked HTML code is simple. It looks like this:
<a href= "
URL">
Link TextThe </a>href property describes the target of the link.
Tips: the link text must not necessarily be text. A picture or other HTML element can be a link.
Case LIST:
<a href= "http://www.runoob.com/" > Access Tutorials </a>
HTML Link-target Property-id property
Using the target property, you can define where the linked document is displayed .
The id attribute can be used to create bookmark tags in an HTML document. tip: bookmarks are not displayed in any particular way, and are not displayed in HTML documents, so they are hidden from the reader.
The following row opens the document in a new window:
Instance
<a href= "http://www.runoob.com/" target= "_blank" > Access rookie Tutorial!</a>
Grammar <a target= "_blank|_self|_parent|_top|
FrameNameThe > property value
value |
Description |
_blank |
Opens the linked document in a new window. |
_self |
Default. Open the linked document in the same frame. |
_parent |
Opens the linked document in the parent frameset. |
_top |
Opens the linked document throughout the window. |
FrameName |
Opens the linked document in the specified frame.
|
HTML Link-type Property
The type attribute specifies the MIME type of the document that is pointed to in the link:
Can only be used when the href attribute is present.
<a href= "http://www.w3cschool.cc" type= "text/html" >W3CSchool</a> syntax <a type= "
Mime_type "> Attribute values
operator |
Description |
Mime_type |
The MIME type of the document being linked. |
Attributes in the link are categorized as:
The new property in the NEW:HTML5.
Properties |
value |
Description |
CharSet |
Char_encoding |
HTML5 not supported. Specifies the character encoding of the destination URL. |
Coords |
Coordinates |
HTML5 not supported. Specifies the coordinates of the link. |
DownloadNew |
FileName |
Specify download links |
Href |
Url |
Specifies the destination URL for the link. |
Hreflang |
Language_code |
Specifies the base language of the destination URL. Used only when the href attribute is present. |
MediaNew |
Media_query |
Specifies the media type of the destination URL. Default value: All. Used only when the href attribute is present. |
Name |
Section_name |
HTML5 not supported. Specifies the name of the anchor. |
Rel |
Alternate Author Bookmark Help License Next Nofollow Noreferrer Prefetch Prev Search Tag |
Specifies the relationship between the current document and the destination URL. Used only when the href attribute is present. |
Rev |
Text |
HTML5 not supported. Specifies the relationship between the target URL and the current document. |
Shape |
Default Rect Circle Poly |
HTML5 not supported. Specifies the shape of the link. |
Target |
_blank _parent _self _top FrameName |
Specifies where to open the destination URL. Used only when the href attribute is present. |
TypeNew |
Mime_type |
Specifies the MIME type of the destination URL. Used only when the href attribute is present. Note: MIME = multipurpose Internet Mail Extensions. |
Just contact the previous paragraph hope that we can be a lot of guidance under my these articles I have read excerpts re-typesetting.
HTML Basics Summary < links >