Eduaction Management 959 Lahore
Code With Jahangir
HTML Links
FREE COURSES
FREE CERTIFICATE
HTML Links
What are HTML LINKS?
- These are specified by
<a>
tag. - HTML LINKS are also known as HYPERLINK.
-
<a>
tag is known as an Anchor tag. -
<a>
tag has its corresponding</a>
tag. - These are used to link one document with another document.
Syntax:
HTML Link uses two attributes :
1. href attribute: Without this tag, we are unable to go to the next page or the next document. This attribute is compulsorily used by the <a> tag. This attribute contains a URL path.
2. target attribute: The link tag uses another attribute which is the target attribute. By default, if we open any link then the page will be displayed in the current browser window. But if we wish to change these settings then we use the target attribute. It tells us where we want our linked document to be opened.
This target attribute can use any of the values:
- _blank: Opens linked document in a new window
- _top: Opens document in the full body of the window
- _self: Opens document in the same window
- _parent: Opens linked document in a parent frame
Link to a Page section:
To link to a particular section of a webpage:
- use the name attribute or id attribute
- use hyperlink with # place where you want to go on a webpage.
Link Colors:
Three types of links are there: active, visited, and unvisited.
- Active: It is in red with an underline.
- Visited: It is purple and underlined.
- Unvisited: It is blue and underlined.
By CSS we can change the color of the links.
Eduaction Management 959 Lahore
Code With Jahangir
HTML Links
FREE COURSES
FREE CERTIFICATE