-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlab_019.html
More file actions
124 lines (118 loc) · 6.69 KB
/
lab_019.html
File metadata and controls
124 lines (118 loc) · 6.69 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
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
114
115
116
117
118
119
120
121
122
123
124
<!doctype html>
<html lang="en">
<head>
<title>
Lab 19 - Paragraphs and Headings
</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="19">
<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 19</em>
Paragraphs and Headings
</h1>
<h2>Goals</h2>
<ul>
<li>Learn about paragraphs and headings in HTML</li>
<li>Add a <code class="language-html"><p></code> to your personal website</li>
<li>Add headings to your personal website</li>
</ul>
<h2>Paragraph Structuring</h2>
<p>In your <code>index.html</code>'s <code class="language-html"><body></code>, add another line:</p>
<h3 class="file-heading"><em>index.html</em></h3>
<pre class="file line-numbers" data-line="10" data-src="prism/html/1901.html"></pre>
<p>If you go to your webpage in your browser, you'll see that the text you added does not look the same as in your
code, on two separate lines.</p>
<img class="image" src="assets/1901.png" alt="The text added to the page is not on two separate lines.">
<p>This is because web browsers don't usually take into account the way your code looks. Remember, HTML is all
about meaning, or <strong>semantics</strong>. This means that if you want there to be two separate blocks of
text, you need to explicitly code it.</p>
<p>This is where the <code class="language-html"><p></code> tag comes in. Wrap each line of text in a <code
class="language-html"><p></code> tag.</p>
<h3 class="file-heading"><em>index.html</em></h3>
<pre class="file line-numbers" data-src="prism/html/1902.html" data-line="9-10"></pre>
<p>In the browser, you can now see that the paragraphs are on two separate lines.</p>
<img class="image" src="assets/1902.png" alt="The paragraphs added to the page is on two separate lines.">
<p> You can also achieve a line-break using the self-closing <code class="language-html"><br></code>, or
line-break tag, inside of a paragraph tag between text:
<pre><code class="language-html"><p>some text<br>other text</p></code></pre>
<p><em>However</em>, only use this if the ideas in the paragraph are related. Don't use this as a subsitute for
using
multiple paragraph tags.</p>
<h2>Emphasis and Breaks</h2>
<p>So far, all we have is plain text, but there are a couple of ways to emphasize and higlight
important text. You might have noticed some text that have been emphasized throughout this Starter Pack.</p>
<p>To do that you can surround text with the <code class="language-html"><em></code> or the <code
class="language-html"><strong></code> tags. Usually browsers will render the <code
class="language-html"><em></code> as italicized and the <code
class="language-html"><strong></code> tags as bold, but remember that HTML is about semantics or
meaning, not appearance. You should use these when you want to <em>emphasize</em> or <strong>strongly
emphasize</strong> text, not to make text italicized or bolded.</p>
<p>Get rid of the temporary text in your <code>index.html</code>'s <code class="language-html"><main></code>
and instead write an introduction about you! Use paragraphs, emphasis, and strong emphasis where appropriate!
</p>
<img class="image" src="assets/1903.png" alt="A description or about me about Hack4Impact">
<p class="note"><strong>Note:</strong> This is your reminder to commit! If it's been a while, remember you can
separate out the staging
and committing of different files.</p>
<h2>Headings</h2>
<p>Continuing with text formatting, we have headings! They're exactly what they sound like. There are 6 different
headings with specific emphasis and styles. <code class="language-html"><h1></code>, <code
class="language-html"><h2></code>, <code class="language-html"><h3></code>, <code
class="language-html"><h4></code>, <code class="language-html"><h5></code>, and <code
class="language-html"><h6></code>.</p>
<p>At the top of your <code>index.html</code>'s <code class="language-html"><main></code>, before your <code
class="language-html"><p></code> paragraphs, put an <code class="language-html"><h1></code> tag.
Inside, give your home page an appropriate heading. We'll put "hello world!"</p>
<img class="image" src="assets/1904.png" alt="A description or about me about Hack4Impact">
<p>The <code class="language-html"><h1></code> heading is used once as the main heading of a page.
The other headings can be used as many times as necessary, but always in order. <code
class="language-html"><h3></code> should be a sub-heading of <code
class="language-html"><h2></code> and <code class="language-html"><h6></code> should be the
sub-heading of <code class="language-html"><h5></code> and so on.</p>
<h3 class="file-heading"><em>headings.html</em></h3>
<div class="side-by-side-container">
<div class="side-by-side-child">
<pre class="file line-numbers" data-src="prism/html/1903.html"></pre>
</div>
<div class="side-by-side-child">
<iframe class="iframe-full file" src="prism/html/1903.html"></iframe>
</div>
</div>
</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>