-
Notifications
You must be signed in to change notification settings - Fork 0
/
lab_018.html
113 lines (107 loc) · 5.52 KB
/
lab_018.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<!doctype html>
<html lang="en">
<head>
<title>
Lab 18 - Section </title>
<meta charset="UTF-8" />
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible" />
<meta "="" content=" width=device-width, initial-scale=1.0" name="viewport" />
<meta content="A guided tour through the fundamentals of Git, HTML, & CSS" name=" description" />
<meta content="#0000ff" name="theme-color" />
<link href="manifest.json" rel="manifest" />
<link href="css/reset.css" media="screen" rel="stylesheet" />
<link href="css/screen.css" media="screen" rel="stylesheet" />
<link href="css/prism.css" rel="stylesheet" />
</head>
<body data-lab-id="18">
<a class="skip-to-content" href="#content" tabindex="1">
Skip to content
</a>
<main class="layout">
<nav id="index">
<p class="link-home">
<a href="index.html">
<span>Hack4Impact Starter Pack</span>
</a>
</p>
<button class="link-menu">
Menu
</button>
<nav tabindex="0">
<ol>
</ol>
</nav>
</nav>
<div id="content" tabindex="-1">
<h1 class="lab_title">
<em>Lab 18</em>
Sections
</h1>
<h2>Goals</h2>
<ul>
<li>Learn about the different sections in HTML</li>
<li>Add a <code class="language-html"><nav></code> to your personal website</li>
<li>Add a <code class="language-html"><main></code> to your personal website</li>
<li>Add a <code class="language-html"><footer></code> to your personal website</li>
</ul>
<h2>Main, Article, and Section</h2>
<p>Inside of the <code class="language-html"><body></code> tag, there are a few ways to provide clear
meaning to the structure of your content. HTML provides us with the <code
class="language-html"><main></code>, <code class="language-html"><article></code>, and <code
class="language-html"><section></code> tags.</p>
<p>The <code class="language-html"><main></code> tag is used once to signify the most important content on
the page. The <code class="language-html"><article></code> tag can be used once like in a blog or multiple
times like in a newspaper to signify a blocks of content. And of course, <code
class="language-html"><section></code> is a more general divisor which can break up <code
class="language-html"><article></code> or represent chapters.</p>
<p>Let's add a few sections to different HTML pages:</p>
<ul>
<li>Add a <code class="language-html"><main></code> tag inside the <code
class="language-html"><body></code> tag of every page</li>
<li>Add 5 <code class="language-html"><section></code> tags inside the <code
class="language-html"><main></code> tag of your <code>resume.html</code></li>
</ul>
<h3 class="file-heading"><em>resume.html</em></h3>
<pre class="file line-numbers" data-src="prism/html/1801.html"></pre>
<h2>Header, Nav, and Footer</h2>
<p>Aside from your main content, there are a few more key semantic categories. If it exists, the <code
class="language-html"><header></code>
tag is usually the first, at the top, inside the <code class="language-html"><body></code> tag.
This is for page banners, introductory content, slogans, etc..
</p>
<p>Next, there is the <code class="language-html"><nav></code> tag. This is where the navigation bar and
links to other pages goes. This is comes right before <code class="language-html"><main></code>.
Finally, there is the <code class="language-html"><footer></code> which comes after <code
class="language-html"><main></code>.
On websites, this is usually where copyright information, privacy notices, etc goes.</p>
<p>In your <code>index.html</code>, add the following tags where they belong!
</p>
<ul>
<li>The <code class="language-html"><nav></code> tag at the top inside the <code
class="language-html"><body></code> tag</li>
<li>The <code class="language-html"><main></code> tag after the <code
class="language-html"><nav></code> tag</li>
<li>Remember to move your text inside your <code class="language-html"><main></code> tag!</li>
<li>The <code class="language-html"><footer></code> tag after the <code
class="language-html"><main></code></li>
</ul>
<h2>Section Other Pages</h2>
<li>
Add a <code class="language-html"><nav></code> and
<code class="language-html"><footer></code> to each page's
<code class="language-html"><body></code> the same way you did for <code>index.html</code>
</li>
<li>In every <code class="language-html"><footer></code>, put the following text: "© 2023 <Personal Website Name> | All Rights Reserved"</li>
<p class="note"><strong>Note:</strong> All these tags have an opening and a closing tag. Also, your
<code class="language-html"><body></code> tag should still enclose everything.
</p>
</div>
</main>
<script src="js/ui.js" type="text/javascript"></script>
<script src="js/prism.js" type="text/javascript"></script>
<script type="module">
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs';
mermaid.initialize({startOnLoad: true, theme: "base"});
</script>
</body>
</html