-
Notifications
You must be signed in to change notification settings - Fork 0
/
Links.html
81 lines (79 loc) · 2.31 KB
/
Links.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<!----Links in html using the targe attribute-->
<h1>Target using _self attribute</h1>
<a href="https://www.google.com"target="_self">google</a>
<!----Links in html using the targe using blank keyword attribute-->
<h1>Target using _blank attribute</h1>
<a href="https://www.google.com"target="_blank">google</a>
<h1>Target using _parent attribute</h1>
<a href="https://www.google.com"target="_parent">google browser</a>
<h1>Target using _top attribute</h1>
<h1>Absolute Url</h1>
<a href="https://www.google.com"target="_top">google browser</a>
<!----using image as a link in anchor tag-->
<h2>Image Link<br></h2>
<a href="image.html"><img src="/assets/img.jpg "width=700px;">Image Link</a>
<!----using email as a link use mailto attribute in anchor tag-->
<h2>Email using anchor Tag</h2>
<a href="mailto:hafizhamza78699@gmail.com">Send Email</a>
<!----using title Attribute as links using anchor Tag-->
<h2>Link Titles</h2>
<a href="https://www.w3schools.com/css/" title="Go to W3Schools CSS section">CSS Tutorial</a>
<!----using CSS we can change color's of the anchor Tag-->
<br>
<style>
a:link
{
color:blue;
background-color: red;
font-size: 40px;
text-decoration:underline;
}
a:visited
{
color:brown;
text-decoration: underline;
background-color: purple;
}
a:unvisited
{
color:brown;
text-decoration: none;
background-color: blue;
}
a:hover
{
color: royalblue;
text-decoration: underline;
background-color: aqua;
}
a:link, a:visited {
background-color: #f44336;
color: white;
padding: 15px 25px;
text-align: center;
text-decoration: none;
display: inline-block;
}
a:hover, a:active {
background-color: red;
}
</style>
<!--create bookMark links using the id atttribute in html-->
<h2 id="Web Programming">HTML</h2>
<h2 id="Python Programming">Python</h2>
<!--Adding the link to the bookmark using the anchor Tag in html-->
<a href="#Web Programming"> Jump to the HTML Tutorial</a>
<br>
<br>
<a href="#Python Programming">Jump to the Python Tutorial</a>
</body>
</html>