Skip to content

Commit b33be0a

Browse files
authored
Merge pull request mdn#633 from bsmth/representing-computer-code
chore(html): use const, format code example
2 parents 4584ac2 + 023b725 commit b33be0a

File tree

1 file changed

+26
-10
lines changed

1 file changed

+26
-10
lines changed
Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,56 @@
11
<!DOCTYPE html>
22
<html lang="en-us">
33
<head>
4-
<meta charset="utf-8">
5-
<meta name="viewport" content="width=device-width">
4+
<meta charset="utf-8" />
5+
<meta name="viewport" content="width=device-width" />
66
<title>Other semantics examples</title>
77
</head>
88
<body>
9-
<p>We use <abbr>HTML</abbr>, Hypertext Markup Language, to structure our web documents.</p>
9+
<p>
10+
We use <abbr>HTML</abbr>, Hypertext Markup Language, to structure our web
11+
documents.
12+
</p>
1013

11-
<p>I think <abbr title="Reverend">Rev.</abbr> Green did it in the kitchen with the chainsaw.</p>
14+
<p>
15+
I think <abbr title="Reverend">Rev.</abbr> Green did it in the kitchen
16+
with the chainsaw.
17+
</p>
1218

1319
<address>
1420
<p>Chris Mills, Manchester, The Grim North, UK</p>
1521
</address>
1622

1723
<p>My birthday is on the 25<sup>th</sup> of May 2001.</p>
1824

19-
<p>Caffeine's chemical formula is C<sub>8</sub>H<sub>10</sub>N<sub>4</sub>O<sub>2</sub>.</p>
25+
<p>
26+
Caffeine's chemical formula is
27+
C<sub>8</sub>H<sub>10</sub>N<sub>4</sub>O<sub>2</sub>.
28+
</p>
2029

2130
<p>If x<sup>2</sup> is 9, x must equal 3.</p>
2231

23-
<pre><code>var para = document.querySelector('p');
32+
<pre><code>const para = document.querySelector('p');
2433

2534
para.onclick = function() {
2635
alert('Owww, stop poking me!');
2736
}</code></pre>
2837

29-
<p>You shouldn't use presentational elements like <code>&lt;font&gt;</code> and <code>&lt;center&gt;</code>.</p>
38+
<p>
39+
You shouldn't use presentational elements like
40+
<code>&lt;font&gt;</code> and <code>&lt;center&gt;</code>.
41+
</p>
3042

31-
<p>In the above JavaScript example, <var>para</var> represents a paragraph element.</p>
43+
<p>
44+
In the above JavaScript example, <var>para</var> represents a paragraph
45+
element.
46+
</p>
3247

33-
<p>Select all the text with <kbd>Ctrl</kbd>/<kbd>Cmd</kbd> + <kbd>A</kbd>.</p>
48+
<p>
49+
Select all the text with <kbd>Ctrl</kbd>/<kbd>Cmd</kbd> + <kbd>A</kbd>.
50+
</p>
3451

3552
<pre>$ <kbd>ping mozilla.org</kbd>
3653
<samp>PING mozilla.org (63.245.215.20): 56 data bytes
3754
64 bytes from 63.245.215.20: icmp_seq=0 ttl=40 time=158.233 ms</samp></pre>
38-
3955
</body>
4056
</html>

0 commit comments

Comments
 (0)