-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
307 lines (276 loc) · 17.8 KB
/
index.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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
<!doctype html>
<html lang="en-US">
<head>
<meta charset="utf-8" />
<title>HTML5 Markup Guide</title>
<link rel="stylesheet" media="screen" href="css/style.css" />
<!-- mint statistics | REMOVE THIS -->
<script src="../mint/?js" type="text/javascript"></script>
</head>
<body>
<header role="banner">
<hgroup>
<h1><a rel="home" title="html5 markup guide" href="/">HTML5 Markup Guide</a></h1>
<h2 title="Description">default markup for testing how each element is styled</h2>
</hgroup>
<nav role="navigation">
<ul>
<li><a href="/" title="Nav Item 1" accesskey="1">Nav Item 1</a></li>
<li><a href="/" title="Nav Item 2" accesskey="2">Nav Item 2</a></li>
<li><a href="/" title="Nav Item 3" accesskey="3">Nav Item 3</a></li>
</ul>
</nav>
</header>
<hr />
<section role="main">
<article role="article">
<h1 class="entry-title">Markup Guide</h1>
<div class="entry-content">
<p>Within this document, references will be made to <em>elements</em> and <em>attributes</em>. It's important to understand the difference, <wbr>so consider this sample code:</p>
<p><code><a href="index.php">Home</a></code></p>
<p>The base <abbr title="HyperText Markup Language">HTML</abbr> element is the <code>a</code> in this case. The attribute is any additional information about that element within the initial < > pair, or the <code>href</code> value in this case.</p>
<p>To view the example usage for any item within this document, please view its source.</p>
<hr />
<h2>Header <a href="#">Examples</a></h2>
<p>The main page header of this guide is an <code>h1</code> element. Please reserve <code>h1</code> for individual page titles only. Any header elements may include links, as depicted in the example.</p>
<p>The secondary header above is an <code>h2</code> element, which may be used for any form of important page-level header. More than one may be used per page. Consider using an <code>h2</code> unless you need a header level of less importance, or as a sub-header to an existing <code>h2</code> element. Any header level may include links, as depicted in the example.</p>
<h3>Third-Level Header</h3>
<p>The header above is an <code>h3</code> element, which may be used for any form of page-level header which falls below the <code>h2</code> header in a document hierarchy. More than one may be used per page.</p>
<h4>Fourth-Level Header</h4>
<p>For all headers below third-level, follow the guidelines listed above. Only use lower header levels when necessary.</p>
<h5>Fifth-Level Header</h5>
<p>For all headers below third-level, follow the guidelines listed above. Only use lower header levels when necessary.</p>
<h6>Sixth-Level Header</h6>
<p>For all headers below third-level, follow the guidelines listed above. Only use lower header levels when necessary.</p>
<hr />
<h2>Paragraphs</h2>
<p>All paragraphs are wrapped in <code>p</code> tags. Additionally, <code>p</code> elements can be wrapped with a <code>blockquote</code> element <em>if the <code>p</code> element is indeed a quote</em>. Historically, <code>blockquote</code> has been used purely to force indents, but this is now achieved using CSS. Reserve <code>blockquote</code> for quotes. Here's an example of correct usage:</p>
<blockquote cite="http://lipsum.com/feed/html">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras euismod fringilla arcu. Integer posuere. Aliquam ipsum. Donec eget massa ac orci tempus euismod. Donec quis neque nec neque consequat sollicitudin. Donec commodo tempor nulla. Suspendisse venenatis. Ut ut leo. Nunc placerat urna at libero. Nunc suscipit lacus.</p>
<p><cite><a href="http://lipsum.com/feed/html">lipsum.com</a></cite></p>
</blockquote>
<p>Additionally, you might wish to cite the source, as in the above example. (The correct method involves the <code>cite</code> attribute directly applied to the <code>blockquote</code> element, but since no browser makes any use of that information whatsoever, it's useful to also specify the standalone <code>cite</code> element.)</p>
<hr />
<h2>Inline Text</h2>
<p>You might have noticed all the monospaced text in this guide. There are a number of inline <abbr title="HyperText Markup Language">HTML</abbr> elements you may use anywhere within other elements, including <abbr title="Abbreviation">abbr</abbr>, <cite>cite</cite>, <code>code</code>, <del>del</del>, <em>em</em>, <ins>ins</ins>, <kbd>kbd</kbd>, <strong>strong</strong>, and <var>var</var>.</p>
<dl>
<dt><abbr title="Abbreviation">abbr</abbr></dt>
<dd>Used for any abbreviated text, whether it be initialism or otherwise. Generally, it's less work and useful (enough) to mark up only the first occurence of any particular abbreviation on a page, and ignore the rest. Any text in the <code>title</code> attribute will appear when the user's mouse hovers the abbreviation (although notably, this does not work in Internet Explorer for Windows). Example abbreviations and usage: <abbr title="National Aeronautics and Space Administration">NASA</abbr>, <abbr title="HyperText Markup Language">HTML</abbr>, and <abbr title="Massachusetts">Mass.</abbr></dd>
<dt><code>code</code></dt>
<dd>
<p>Used for computer code samples. Useful for technology-oriented sites, not so useful otherwise. Example code and usage:</p>
<pre><code>function getJello() {
echo $aDeliciousSnack;
}</code></pre>
<p>Inline usage: just like elsewhere in this document, <abbr title="HyperText Markup Language">HTML</abbr> elements like <code>em</code> or <code>code</code> can be considered code, and marked up as such.</p>
</dd>
<dt><cite>cite</cite></dt>
<dd>Used for defining a citation or reference to other information sources. Example cited text and usage: More information can be found in <cite>[ISO-0000]</cite></dd>
<dt><del datetime="2011-04-22T19:00:00+03:00">del</del></dt>
<dd>Used for deleted or retracted text which still must remain on the page for some reason. Since the default style inc a strikethrough line, it's preferable to the <code>s</code> element. The <code>del</code> element also has a <code>datetime</code> attribute which allows you to include a timestamp directly in the element. Example deleted text and usage: She bought <del datetime="2011-04-22T19:00:00+03:00">two</del> <ins datetime="2011-04-22T19:00:00+03:00">five</ins> pairs of shoes.</dd>
<dt><em>em</em></dt>
<dd>Used for denoting emphasized text. In most instances where you'd want to italicize text (using the <abbr title="HyperText Markup Language">HTML</abbr> element <code>i</code> or otherwise) you should use the <code>em</code> element instead. Notable exceptions are stylistic italicizing of proper titles, foreign languages, etc. where italicizing is used for differentiation instead of emphasis. In those cases, no proper <abbr title="HyperText Markup Language">HTML</abbr> elements exist, so an <code>i</code> element or a <code>span</code> element with a custom class may be preferable. Example emphasized text and usage: You simply <em>must</em> try the negitoro maki!</dd>
<dt><ins datetime="2011-04-22T19:21:00+03:00">ins</ins></dt>
<dd>Used for inserted text and counterpart to the <code>del</code> element. Like <code>del</code>, <code>ins</code> has a <code>datetime</code> attribute which allows you to include a timestamp directly in the element. Example inserted text and usage: She bought <del datetime="2011-04-22T19:21:00+03:00">two</del> <ins datetime="2011-04-22T19:21:00+03:00">five</ins> pairs of shoes.</dd>
<dt><kbd>kbd</kbd></dt>
<dd>Used for text which should be typed by the user. Mainly useful for computer instructions. Example keyboard text and usage: Please press <kbd>Enter</kbd> to continue.</dd>
<dt><strong>strong</strong></dt>
<dd>Used for denoting stronger emphasis than the <code>em</code> element. In most instances where you'd want to bold text (using the <abbr title="HyperText Markup Language">HTML</abbr> element <code>b</code> or otherwise) you should use the <code>strong</code> element instead. Notable exceptions are stylistic bolding of examples, first occurences of names in an article, etc. where bolding is used for differentiation instead of emphasis. In those cases, no proper <abbr title="HyperText Markup Language">HTML</abbr> elements exist, so <code>b</code> element or a <code>span</code> element with a custom class may be preferable. Example strong text and usage: <strong>Don't</strong> stick nails in the electrical outlet.</dd>
<dt><var>var</var></dt>
<dd>Used for variables within computer code snippets. Useful for technology-oriented sites, not so useful otherwise. Example code and usage: Add 5 to <var>$result</var> and recalculate.</dd>
<dt><small>small</small></dt>
<dd>The <code>small</code> element represents side comments such as small print.</dd>
<dt><s>s</s></dt>
<dd>The <code>s</code> element represents contents that are no longer accurate or no longer relevant. When indicating document edits, use the <code>del</code> instead.</dd>
<dt><q>q</q></dt>
<dd><q cite="http://www.w3.org/wiki/HTML/Elements/q">The <code>q</code> element represents some phrasing content quoted from another source.</q> as stated on w3.org wiki.</dd>
<dt><dfn>dfn</dfn></dt>
<dd>The <dfn title="Hyper Text Markup Language">HTML</dfn> is the publishing language of the World Wide Web.</dd>
<dt><samp>samp</samp></dt>
<dd>The <code>samp</code> element represents output from a program or computing system. If you input a wrong value, it is displayed as <samp>error!!</samp></dd>
<dt><mark>mark</mark></dt>
<dd>The <code>mark</code> element represents a run of text in one document marked or highlighted for reference purposes, due to its relevance in another context.
<blockquote lang="en-GB">
<p>Look around and you will find, no-one's really <mark>colour</mark> blind.</p>
</blockquote>
<p lang="en-US">As we can tell from the <em>spelling</em> of the word, the person writing this quote is clearly not American.</p>
</dd>
</dl>
<hr />
<h2>Subscripts and Superscripts</h2>
<p>In order to test how subscripts and superscripts (<code>sub</code> and <code>sup</code> markup) work inside running text, we need some dummy text around constructs like x<sub>1</sub> and H<sub>2</sub>O (where subscripts occur). So here is some fill so that you will (hopefully) see whether and how badly the subscripts and superscripts mess up vertical spacing between lines. Now superscripts: M<sup>lle</sup>, 1<sup>st</sup>, and then some mathematical notations: e<sup>x</sup>, sin<sup>2</sup> <i>x</i>, and some nested superscripts (exponents) too: Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>
<hr />
<h2>Address</h2>
<address>
John Doe LLC<br />
111 Example Avenue<br />
13341 Ano Liosia<br />
Athens, Greece<br />
Phone: +39 210 123 4567<br />
web : <a href="http://www.singeridis.com/markup">www.singeridis.com/markup/</a><br />
email : <a href="mailto:me@example.com">me@example.com</a>
</address>
<hr />
<h2>Figure and figcaption</h2>
<p>The <code>figure</code> element represents some flow content.</p>
<figure>
<img src="img/superfeios.jpg" alt="The Super Sergios!">
<figcaption>The Super Sergios!</figcaption>
</figure>
<hr />
<h2>Lists</h2>
<p>Then there are the lists. <code>ul</code> denotes an unordered list (ie. a list of loose items that don't require numbering, or a bulleted list). <code>ol</code> denotes an ordered list, and various numbering schemes are available through the CSS (including 1,2,3... a,b,c... i,ii,iii... and so on). Each item within the <code>ul</code> or <code>ol</code> requires a surrounding <code><li></code> and <code></li></code> tag, to denote individual items within the list (as you may have guessed, <code>li</code> stands for list item).</p>
<p>Additionally, <code>dl</code> is another list type called a definition list. Instead of list items, the content of a <code>dl</code> consists of <code>dt</code> (Definition Term) and <code>dd</code> (Definition description) pairs. Though it may be called a "definition list", <code>dl</code> can apply to other scenarios where a parent/child relationship is applicable. For example, it may be used for marking up dialogues, with each <code>dt</code> naming a speaker, and each <code>dd</code> containing his or her words.</p>
<p>Example lists and usage:</p>
<ul>
<li>This is an unordered list.</li>
<li>It has two items.</li>
</ul>
<ol>
<li>This is an ordered list.</li>
<li>It has two items.</li>
<li>No, I lied, it has three.</li>
</ol>
<dl>
<dt>This is a term.</dt>
<dd>This is the definition of that term, which both live in a <code>dl</code>.</dd>
<dt>Here is another term.</dt>
<dd>And it gets a definition too, which is this line.</dd>
<dt>Here is term that shares a definition with the term below.</dt>
<dt>Here is a defined term.</dt>
<dd><code>dt</code> terms may stand on their own without an accompanying <code>dd</code>, but in that case they <em>share</em> descriptions with the next available <code>dt</code>. You may not have a <code>dd</code> without a parent <code>dt</code>.</dd>
</dl>
<hr />
<h2>Tables</h2>
<p>The following table has a caption. The first row and the first column contain table header cells only; other cells are data cells.</p>
<table>
<caption>Caption: Sample table: Areas of some countries, in sq km</caption>
<thead>
<tr>
<th>Country</th>
<th>Total area</th>
<th>Land area</th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="3">Copyright...</td>
</tr>
</tfoot>
<tbody>
<tr>
<th>Greece</th>
<td>131,990</td>
<td>130,800</td>
</tr>
</tbody>
<tr>
<th>Finland</th>
<td>337,030</td>
<td>305,470</td>
</tr>
<tr>
<th>Iceland</th>
<td>103,000</td>
<td>100,250</td>
</tr>
<tr>
<th>Norway</th>
<td>324,220</td>
<td>307,860</td>
</tr>
<tr>
<th>Sweden</th>
<td>449,964</td>
<td>410,928</td>
</tr>
</table>
<hr />
<h2>Forms</h2>
<form action="/">
<ol>
<li>
<label for="f1">Single-line text input field:</label>
<input id="f1" name="text" size="20" value="Default text." />
</li>
<li>
<label for="f2">Multi-line text input field (textarea):</label><br />
<textarea id="f2" name="textarea" rows="16" cols="20">Default text.</textarea>
</li>
<li>
<p>The following radio buttons are inside <code>fieldset</code> element with a <code>legend</code>:</p>
</li>
<li>
<fieldset>
<legend>Legend</legend>
<label for="f3">Radio button 1</label>
<input id="f3" type="radio" name="radio" value="1" />
<label for="f4">Radio button 2 (initially checked)</label>
<input id="f4" type="radio" name="radio" value="2" checked="checked" />
</fieldset>
</li>
<li>
<fieldset>
<legend>Check those that apply</legend>
<label for="f5">Checkbox 1</label>
<input id="f5" type="checkbox" name="checkbox" />
<label for="f6">Checkbox 2 (initially checked)</label>
<input id="f6" type="checkbox" name="checkbox2" checked="checked" />
</fieldset>
</li>
<li>
<label for="f10">Dropdown box:</label>
<select id="f10" name="select1" size="1">
<option>one</option>
<option selected="selected">two (default)</option>
<option>three</option>
</select>
</li>
<li>
<label for="f11">A <code>select</code> element with <code>size="3"</code> (listbox):</label>
<select id="f11" name="select2" size="3">
<option>one</option>
<option selected="selected">two (default)</option>
<option>three</option>
</select>
</li>
<li>
<select name="c">
<optgroup label="8.01 Physics I: Classical Mechanics">
<option value="8.01.1">Lecture 01: Powers of Ten</option>
<option value="8.01.2">Lecture 02: 1D Kinematics</option>
<option value="8.01.3">Lecture 03: Vectors</option>
</optgroup>
<optgroup label="8.02 Electricity and Magnestism">
<option value="8.02.1">Lecture 01: What holds our world together?</option>
<option value="8.02.2">Lecture 02: Electric Field</option>
<option value="8.02.3">Lecture 03: Electric Flux</option>
</optgroup>
<optgroup label="8.03 Physics III: Vibrations and Waves">
<option value="8.03.1">Lecture 01: Periodic Phenomenon</option>
<option value="8.03.2">Lecture 02: Beats</option>
<option value="8.03.3">Lecture 03: Forced Oscillations with Damping</option>
</optgroup>
</select>
</li>
<li>
<button type="submit" value="submit">submit</button>
<button type="reset" value="reset">reset</button>
</li>
</ol>
</form>
<hr />
</div>
</article>
</section>
<aside role="complementary">
<section>
</section>
</aside>
<footer role="contentinfo">
<p><a href="http://mezzoblue.com/downloads/markupguide/markupguide.html" rel="external">Created by Dave Shea</a>, adapted by <a href="http://www.singeridis.com/" rel="external">Sergios Singeridis</a> [ <a class="email" href="mailto:info@singeridis.com">info@singeridis.com</a> ].</p>
<p>This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-ShareAlike 3.0 Unported License</a>.</p>
<p>This page is built using <abbr title="Cascading Style Sheets v3">CSS3</abbr> and <abbr title="HyperText Markup Language v5">HTML5</abbr>.</p>
</footer>
</body>
</html>