Skip to content

Commit 75fd3e5

Browse files
committed
Tidying up
Sections for H4s / H5s, closing tags, missing tags etc.
1 parent 86e299d commit 75fd3e5

41 files changed

Lines changed: 306 additions & 169 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎techniques/css/C13.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,6 @@ <h2>Resources</h2>
6969
</li>
7070
</ul>
7171
</section>
72-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/styles/default.min.css"> <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/highlight.min.js"></script> <script>hljs.highlightAll();</script>
72+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/styles/default.min.css"/> <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/highlight.min.js"></script> <script>hljs.highlightAll();</script>
7373
</body>
7474
</html>

‎techniques/css/C15.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,6 @@ <h2>Resources</h2>
111111
</li>
112112
</ul>
113113
</section>
114-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/styles/default.min.css"> <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/highlight.min.js"></script> <script>hljs.highlightAll();</script>
114+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/styles/default.min.css"/> <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/highlight.min.js"></script> <script>hljs.highlightAll();</script>
115115
</body>
116116
</html>

‎techniques/css/C17.html‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ <h2>Examples</h2>
2525
<section class="example">
2626
<h3>A Contact Form</h3>
2727
<p>A Contact Us form has some introductory information and then form controls for users to enter their first name, last name, telephone number and email address. All of the text and form controls have been implemented in a scalable way.</p>
28-
28+
<section id="the-html">
2929
<h4>The HTML</h4>
3030

3131
<pre xml:space="preserve"><code class="language-html">&lt;h1&gt;Contact Us&lt;/h1&gt;
@@ -48,14 +48,16 @@ <h4>The HTML</h4>
4848
&lt;input autocomplete="email" id="email" name="email" type="text"&gt;
4949
&lt;/div&gt;
5050
&lt;input id="submit" name="submit" type="submit" value="Submit"&gt;</code></pre>
51-
52-
<h4>The CSS component</h4>
51+
</section>
52+
<section id="the-css">
53+
<h4>The CSS component</h4>
5354

5455
<pre xml:space="preserve"><code class="language-css">h1 { font-size: 2em; }
5556
p, label { font-size: 1em; }
5657
label { display:block; }
5758
input { font: inherit; }
5859
div { margin-bottom: 1rem; }</code></pre>
60+
</section>
5961

6062
<p class="working-example">Working example of this code: <a href="../../working-examples/input-resize/">Example of resizing input with CSS</a>.</p>
6163
</section>

‎techniques/css/C18.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,6 @@ <h2>Resources</h2>
6060
</li>
6161
</ul>
6262
</section>
63-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/styles/default.min.css"> <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/highlight.min.js"></script> <script>hljs.highlightAll();</script>
63+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/styles/default.min.css"/> <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/highlight.min.js"></script> <script>hljs.highlightAll();</script>
6464
</body>
6565
</html>

‎techniques/css/C22.html‎

Lines changed: 82 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -47,94 +47,125 @@ <h2>Description</h2>
4747
<h2>Examples</h2>
4848
<section class="example">
4949
<h3>Using CSS font-family to control the font family for text</h3>
50+
<section id="the-html">
5051
<h4>The HTML component</h4>
5152
<pre xml:space="preserve"><code class="language-html">&lt;p&gt;The JavaScript method to convert a string to uppercase is &lt;code&gt;toUpperCase()&lt;/code&gt;.&lt;/p&gt;</code></pre>
53+
</section>
54+
<section id="the-css">
5255
<h4>The CSS component</h4>
5356
<pre xml:space="preserve"><code class="language-css">code { font-family:"Courier New", Courier, monospace }</code></pre>
57+
</section>
5458
</section>
5559
<section class="example">
5660
<h3>Using CSS text-align to control the placement (alignment) of text</h3>
57-
<h4>The HTML component</h4>
58-
<pre xml:space="preserve"><code class="language-html">&lt;p class="right"&gt;This text should be to the right of the viewport.&lt;/p&gt;</code></pre>
59-
<h4>The CSS component</h4>
60-
<pre xml:space="preserve"><code class="language-css">.right { text-align: right; }</code></pre>
61+
<section id="the-html2">
62+
<h4>The HTML component</h4>
63+
<pre xml:space="preserve"><code class="language-html">&lt;p class="right"&gt;This text should be to the right of the viewport.&lt;/p&gt;</code></pre>
64+
</section>
65+
<section id="the=css2">
66+
<h4>The CSS component</h4>
67+
<pre xml:space="preserve"><code class="language-css">.right { text-align: right; }</code></pre>
68+
</section>
6169
</section>
6270
<section class="example">
6371
<h3>Using CSS font-size to control the size of text</h3>
64-
<h4>The HTML component</h4>
65-
<pre xml:space="preserve"><code class="language-html">&lt;p&gt;09 &lt;strong class="largersize"&gt;March&lt;/strong&gt; 2008&lt;/p&gt;</code></pre>
66-
<h4>The CSS component</h4>
72+
<section id="the-html3">
73+
<h4>The HTML component</h4>
74+
<pre xml:space="preserve"><code class="language-html">&lt;p&gt;09 &lt;strong class="largersize"&gt;March&lt;/strong&gt; 2008&lt;/p&gt;</code></pre>
75+
</section>
76+
<section id="the-css3">
77+
<h4>The CSS component</h4>
6778
<pre xml:space="preserve"><code class="language-css">strong.largersize { font-size: 1.5em; }</code>
6879
</pre>
80+
</section>
6981
</section>
7082
<section class="example">
7183
<h3>Using CSS color to control the color of text</h3>
7284
<div class="note">
7385
<p>The style used in this example is not used to convey information, structure or relationships.</p>
7486
</div>
75-
<h4>The HTML component</h4>
87+
<section id="the-html4">
88+
<h4>The HTML component</h4>
7689
<pre xml:space="preserve"><code class="language-html">&lt;p&gt;09 &lt;em class="highlight"&gt;March&lt;/em&gt; 2008&lt;/p&gt;</code></pre>
77-
<h4>The CSS component</h4>
90+
</section>
91+
<section id="the-css4">
92+
<h4>The CSS component</h4>
7893
<pre xml:space="preserve"><code class="language-css">.highlight{ color: red; }</code></pre>
94+
</section>
7995
</section>
8096
<section class="example">
8197
<h3>Using CSS font-style to italicize text</h3>
8298

8399
<div class="note">
84100
<p>The style used in this example is not used to convey information, structure or relationships.</p>
85101
</div>
86-
<h4>The HTML component</h4>
102+
<section id="the-html5">
103+
<h4>The HTML component</h4>
87104

88105
<pre xml:space="preserve"><code class="language-html">&lt;p&gt;The article is available in the
89106
&lt;a href="https://www.example.com" class="featuredsite"&gt;Endocrinology Blog&lt;/a&gt;.
90107
&lt;/p&gt;</code></pre>
91-
92-
<h4>The CSS component</h4>
108+
</section>
109+
<section id="the-css5">
110+
<h4>The CSS component</h4>
93111

94112
<pre xml:space="preserve"><code class="language-css">.featuredsite{ font-style:italic; }</code></pre>
113+
</section>
95114
</section>
96115
<section class="example">
97116
<h3>Using CSS font-weight to control the font weight of the text</h3>
98117
<div class="note">
99118
<p>The style used in this example is not used to convey information, structure or relationships.</p>
100119
</div>
101-
<h4>The HTML component</h4>
120+
<section id="the-html6">
121+
<h4>The HTML component</h4>
102122
<pre xml:space="preserve"><code class="language-html">&lt;p&gt;This deal is available &lt;span class="highlight"&gt;now!&lt;/span&gt;&lt;/p&gt;</code></pre>
103-
123+
</section>
124+
<section id="the-css6">
104125
<h4>The CSS component</h4>
105126
<pre xml:space="preserve"><code class="language-css">.highlight { font-weight:bold; color:#990000; }</code></pre>
127+
</section>
106128
</section>
107129
<section class="example">
108130
<h3>Using CSS text-transform to control the case of text</h3>
109131
<div class="note">
110132
<p>The style used in this example is not used to convey information, structure or relationships.</p>
111133
</div>
112-
<h4>The HTML component</h4>
134+
<section id="the-html7">
135+
<h4>The HTML component</h4>
113136
<pre xml:space="preserve"><code class="language-html">&lt;p&gt;09 &lt;span class="caps"&gt;March&lt;/span&gt; 2008&lt;/p&gt;</code></pre>
114-
115-
<h4>The CSS component</h4>
137+
</section>
138+
<section id="the-css7">
139+
<h4>The CSS component</h4>
116140
<pre xml:space="preserve"><code class="language-css">.caps { text-transform:uppercase; }</code></pre>
141+
</section>
117142
</section>
118143
<section class="example">
119144
<h3>Using CSS <code class="language-css">line-height</code> to control spacing between lines of text</h3>
120145
<p>The CSS <code class="language-css">line-height</code> property is used to display the line height for the paragraph at twice the height of the font.</p>
121-
<h4>The HTML component</h4>
146+
<section id="the-html8">
147+
<h4>The HTML component</h4>
122148

123149
<pre xml:space="preserve"><code class="language-html">&lt;p&gt;Concern for man and his fate must always form the chief interest of all technical
124150
endeavors. Never forget this in the midst of your diagrams and equations.&lt;/p&gt;</code></pre>
151+
</section>
152+
<section id="the-css8">
153+
154+
<h4>The CSS component</h4>
125155

126-
<h4>The CSS component</h4>
127-
128-
<pre xml:space="preserve"><code class="language-css">p { line-height:2; }</code></pre>
156+
<pre xml:space="preserve"><code class="language-css">p { line-height:2; }</code></pre>
157+
</section>
129158

130159
<p>The CSS <code class="language-css">line-height</code> property is used to display the line height for the text at less than the height of the font. The second line of text is positioned after the first line of text and visually appears as though the text is part of the first line but dropped a little.</p>
160+
<section id="the-html9">
131161
<h4>The HTML component</h4>
132162

133163
<pre xml:space="preserve"><code class="language-html">&lt;h1 class="overlap"&gt;&lt;span class="upper"&gt;News&lt;/span&gt;
134164
&lt;span class="byline"&gt;today&lt;/span&gt;
135165
&lt;/h1&gt;</code></pre>
136-
137-
<h4>The CSS component</h4>
166+
</section>
167+
<section id="the-css9">
168+
<h4>The CSS component</h4>
138169

139170
<pre xml:space="preserve"><code class="language-css">.overlap { line-height:0.2;}
140171
.upper { text-transform:uppercase; }
@@ -144,16 +175,19 @@ <h4>The CSS component</h4>
144175
font-weight:bold;
145176
padding-left:3em;
146177
}</code></pre>
147-
</section>
178+
</section>
179+
</section>
148180
<section class="example">
149181
<h3>Using CSS <code class="language-css">letter-spacing</code> to space text</h3>
150182
<p>The CSS <code class="language-css">letter-spacing</code> property is used to display the letters farther apart in the heading.</p>
151-
<h4>The HTML component</h4>
183+
<section id="the-html10">
184+
<h4>The HTML component</h4>
152185
<pre xml:space="preserve"><code class="language-html">&lt;h1 class="overlap"&gt;&lt;span class="upper"&gt;News&lt;/span&gt;&lt;br&gt;
153186
&lt;span class="byline"&gt;today&lt;/span&gt;
154187
&lt;/h1&gt;</code></pre>
155-
156-
<h4>The CSS component</h4>
188+
</section>
189+
<section id="the-css10">
190+
<h4>The CSS component</h4>
157191
<pre xml:space="preserve"><code class="language-css">.overlap { line-height:0.2em; }
158192
.upper { text-transform:uppercase; }
159193
.byline {
@@ -163,28 +197,33 @@ <h4>The CSS component</h4>
163197
padding-left:3em;
164198
letter-spacing:-0.1em;
165199
}</code></pre>
200+
</section>
166201

167202
<p>The CSS <code class="language-css">letter-spacing</code> property is used to display the letters closer together in the second line of text.</p>
203+
<section id="the-html11">
168204

169-
<h4>The HTML component</h4>
205+
<h4>The HTML component</h4>
170206

171207
<pre xml:space="preserve"><code class="language-html">&lt;h1 class="upper2"&gt;News&lt;/h1&gt;</code></pre>
172-
208+
</section>
209+
<section id="the-css11">
173210
<h4>The CSS component</h4>
174211

175212
<pre xml:space="preserve"><code class="language-css">.upper2 { text-transform:uppercase; letter-spacing:1em; }</code></pre>
213+
</section>
176214
</section>
177215
<section class="example">
178216
<h3>Using CSS <code class="language-css">background-image</code> to layer text and images</h3>
179217

180218
<p>The CSS <code class="language-css">font-style</code> property is used to display the textual component of a banner and <code class="language-css">background-image</code> property is used to display a picture behind the text.</p>
181-
182-
<h4>The HTML component</h4>
219+
<section id="the-html12">
220+
<h4>The HTML component</h4>
183221

184222
<pre xml:space="preserve"><code class="language-html">&lt;div id="banner"&gt;&lt;span id="bannerstyle1"&gt;Welcome&lt;/span&gt;
185223
&lt;span id="bannerstyle2"&gt;to your local city council&lt;/span&gt;
186224
&lt;/div&gt;</code></pre>
187-
225+
</section>
226+
<section id="the-css12">
188227
<h4>The CSS component</h4>
189228

190229
<pre xml:space="preserve"><code class="language-css">#banner {
@@ -207,31 +246,40 @@ <h4>The CSS component</h4>
207246
letter-spacing:-0.1em;
208247
font-size:1.5em;
209248
}</code></pre>
249+
</section>
210250
</section>
211251
<section class="example">
212252
<h3>Using CSS <code class="language-css">::first-line</code> to control the presentation of the first line of text</h3>
213253

214254
<p>The CSS <code class="language-css">::first-line</code> pseudo-element is used to display the first line of text in a larger, red font.</p>
255+
256+
<section id="the-html13">
215257
<h4>The HTML component</h4>
216258

217259
<pre xml:space="preserve"><code class="language-html">&lt;p class="startline"&gt;Once upon a time...&lt;br /&gt;
218260
...in a land far, far away...&lt;/p&gt;</code></pre>
219-
261+
</section>
262+
<section id="the-css13">
220263
<h4>The CSS component</h4>
221264

222265
<pre xml:space="preserve"><code class="language-css">.startline::first-line { font-size:2em; color:#990000; }</code></pre>
266+
</section>
223267
</section>
224268
<section class="example">
225269
<h3>Using CSS <code class="language-css">::first-letter</code> to control the presentation of the first letter of text</h3>
226270

227271
<p>The CSS <code class="language-css">::first-letter</code> pseudo-element is used to display the first letter in a larger font size, red and vertically aligned in the middle.</p>
272+
273+
<section id="the-html14">
228274
<h4>The HTML component</h4>
229275

230276
<pre xml:space="preserve"><code class="language-html">&lt;p class="startletter"&gt;Once upon a time...&lt;/p&gt;</code></pre>
231-
277+
</section>
278+
<section id="the-css14">
232279
<h4>The CSS component</h4>
233280

234281
<pre xml:space="preserve"><code class="language-css">.startletter::first-letter { font-size:2em; color:#990000; vertical-align:middle; }</code></pre>
282+
</section>
235283
</section>
236284
</section>
237285
<section id="tests">

0 commit comments

Comments
 (0)