-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlinks.html
More file actions
84 lines (67 loc) · 2.2 KB
/
links.html
File metadata and controls
84 lines (67 loc) · 2.2 KB
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
82
83
84
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Links in HTML</title>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<header>
<h1>Links in HTML</h1>
<p>Learn how to connect your pages and navigate your website.</p>
</header>
<nav>
<a href="index.html">Home</a>
<a href="text.html">First HTML file</a>
<a href="links.html">Links</a>
<a href="images.html">Images</a>
<a href="lists.html">Lists</a>
<a href="tables.html">Tables</a>
<a href="css.html">CSS</a>
</nav>
<div class="content">
<div class="lesson-box">
<h2>Basic Link</h2>
<p>The <code><a></code> tag creates a link. Use the <code>href</code> attribute to set the destination:</p>
<pre>
<a href="https://example.com">Visit Example</a>
</pre>
<p>This creates a clickable link that takes the user to another page.</p>
</div>
<div class="lesson-box">
<h2>Linking to Your Own Pages</h2>
<p>You can link to other pages in your project like this:</p>
<pre>
<a href="index.html">Go to Home</a>
<a href="text.html">First HTML File</a>
</pre>
<p>This is how websites connect their sections together.</p>
</div>
<div class="lesson-box">
<h2>Opening Links in a New Tab</h2>
<p>Use <code>target="_blank"</code> to open a link in a new tab:</p>
<pre>
<a href="https://google.com" target="_blank">Open Google</a>
</pre>
</div>
<div class="lesson-box">
<h2>Email Links</h2>
<p>You can create a link that opens the user's email app:</p>
<pre>
<a href="mailto:someone@example.com">Send Email</a>
</pre>
</div>
<div class="lesson-box">
<h2>Lesson Checkpoint</h2>
<p>Before moving on, make sure you have:</p>
<ol>
<li>Added several links to your <code>index.html</code> file.</li>
<li>Linked your pages together using <code><a></code> tags.</li>
<li>Committed your changes to GitHub.</li>
<li>Viewed your updated site on GitHub Pages.</li>
</ol>
<p>Use the navigation bar to continue to the next lesson.</p>
</div>
</div>
</body>
</html>