-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
index.html
432 lines (369 loc) · 18.6 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
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
<!DOCTYPE html>
<!--
Copyright 2017 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<html lang="en">
<head>
<title>simpl.info</title>
<link rel="apple-touch-icon" href="images/icons/icon180.png">
<link rel="shortcut icon" href="images/icons/icon72.png">
<link rel="canonical" href="https://simpl.info">
<link rel="manifest" href="manifest.json">
<meta charset="utf-8">
<meta id="theme-color" name="theme-color" content="#fff">
<meta itemprop="image" content="images/icons/icon192.png">
<meta itemprop="name" content="simpl.info: simplest possible examples of HTML, CSS and JavaScript">
<meta name="author" content="https://samdutton.com">
<meta name="description" content="Simplest possible examples of HTML, CSS and JavaScript.">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta property="og:image" content="https://simpl.info/images/icons/icon256.png">
<meta property="og:site_name" content="simpl.info">
<meta property="og:title" content="simpl.info">
<meta property="og:type" content="website">
<meta property="og:url" content="https://simpl.info">
<meta http-equiv="origin-trial" content="Aj4DysCv3VjknU3jJvkDEwnQZK/vmse4rdd8jZogunrkwtKWO1vmygya5gyKe7GveTObBy8NT3DiC2yiiXnXGwMAAABZeyJvcmlnaW4iOiJodHRwczovL3NpbXBsLmluZm86NDQzIiwiZmVhdHVyZSI6Ik5BIiwiZXhwaXJ5IjoxNjMxNjYzOTk5LCJpc1N1YmRvbWFpbiI6dHJ1ZX0=">
<script>
// philipwalton.com/articles/the-google-analytics-setup-i-use-on-every-site-i-build
window.ga = window.ga || function() {
(ga.q = ga.q || []).push(arguments);
};
ga('create', 'UA-33848682-1', 'auto');
ga('set', 'transport', 'beacon');
ga('send', 'pageview');
</script>
<script async src="https://www.google-analytics.com/analytics.js"></script>
<script type="application/ld+json">
{
"@context": "http://schema.org/",
"@type": "Organization",
"name": "simpl.info",
"logo": "https://simpl.info/images/icons/icon256.png",
"url": "https://simpl.info"
}
</script>
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "WebSite",
"name": "simpl.info",
"url": "https://simpl.info"
}
</script>
<style>
a {
color: #15c;
font-weight: 300;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
a#twitter {
color: black;
display: block;
text-decoration: none;
}
a#viewSource {
border-top: 1px solid #999;
display: block;
margin: 1.3em 0 0 0;
padding: 1em 0 0 0;
}
a#twitter div {
display: inline-block;
font-weight: 500;
position: relative;
top: -13px;
}
a#twitter div:hover {
color: #1da1f2;
}
div#links a {
display: block;
line-height: 1.3em;
margin: 0 0 1.5em 0;
}
@media (min-width: 1000px) {
/* hack! to target non-touch devices */
div#links a {
line-height: 0.8em;
}
}
body {
font-family: sans-serif;
font-weight: 300;
margin: 30px;
padding: 0;
word-break: break-word;
}
div#container {
margin: 0 auto 0 auto;
max-width: 40em;
padding: 1em 1.5em 1.3em 1.5em;
}
div#highlight {
background-color: #eee;
font-size: 1.2em;
margin: 0 0 50px 0;
padding: 0.5em 2em;
}
div#links {
padding: 0.5em 0 0 0;
}
h1 {
border-bottom: 1px solid #ccc;
font-family: sans-serif;
font-weight: 500;
margin: 0 0 0.8em 0;
padding: 0 0 0.2em 0;
}
p {
color: #444;
font-weight: 300;
line-height: 1.6em;
}
p.borderBelow {
border-bottom: 1px solid #eee;
padding: 0 0 20px 0;
}
a#twitter svg {
height: 40px;
width: 40px;
}
@media (max-width: 650px) {
h1 {
font-size: 24px;
}
}
@media (max-width: 550px) {
h1 {
font-size: 22px;
}
}
@media (max-width: 450px) {
body {
margin: 40px 5px 30px 5px;
}
h1 {
font-size: 20px;
}
}
section#george-floyd a {
color: black;
display: block;
font-size: 20px;
font-weight: bold;
margin: 0 0 20px 0;
}
section#george-floyd a#name {
font-size: 28px;
font-weight: bold;
}
section#george-floyd a#dates {
font-size: 22px;
}
section#george-floyd img {
display: block;
margin: 0 auto 40px auto;
max-width: 100%;
width: 400px;
}
section#george-floyd {
border-bottom: 1px solid black;
margin: 0 0 80px 0;
padding: 0 0 60px 0;
text-align: center;
}
@media (min-width: 500px) {
body {
margin: 140px 30px 30px 30px;
}
section#george-floyd {
margin: 0 0 300px 0;
}
}
</style>
<base target="_blank">
</head>
<body>
<div id="container">
<section id="george-floyd">
<a href="https://en.wikipedia.org/wiki/George_Floyd" title="Wikipedia entry for George Floyd" id="name">
<img src="images/george-floyd.jpg" alt="George Floyd">
</a>
<a href="https://en.wikipedia.org/wiki/George_Floyd" title="Wikipedia entry for George Floyd" id="name">George Floyd</a>
<a href="https://secure.actblue.com/donate/naacp-1" id="dates">October 14, 1973 – May 25, 2020</a>
</section>
<!-- <div id="highlight">
<p>Check out my new article: <a href="https://medium.com/@samdutton/website-prelaunch-checklist-14d0002b4c7c">Website prelaunch checklist</a><br>— simple techniques to find and fix glitches.</p>
</div> -->
<!-- <div id="highlight">
<p>I wrote an app!
<br><br>
<a href="https://medium.com/@samdutton/website-prelaunch-checklist-14d0002b4c7c">Multihouse</a> gets median scores for multiple URLs for multiple Lighthouse runs.</p>
</div>
<div id="highlight">
<p>HTML, CSS and JavaScript feature support across top browsers:
<br><br>
<a href="https://bit.ly/caniuse-stuff">bit.ly/caniuse-stuff</a>
</p>
</div> -->
<!-- -->
<!-- <h1>simpl.info</h1>
<a id="twitter" href="https://twitter.com/intent/follow?original_referer=http%3A%2F%2Fsimpl.info%2F&ref_src=twsrc%5Etfw®ion=follow_link&screen_name=sw12&tw_p=followbutton"
rel="noopener" target="_blank" title="Follow @sw12">
<svg viewbox="0 0 400 400">
<title>Follow @sw12</title>
<path d="M153.62,301.59c94.34,0,145.94-78.16,145.94-145.94,0-2.22,0-4.43-.15-6.63A104.36,104.36,0,0,0,325,122.47a102.38,102.38,0,0,1-29.46,8.07,51.47,51.47,0,0,0,22.55-28.37,102.79,102.79,0,0,1-32.57,12.45,51.34,51.34,0,0,0-87.41,46.78A145.62,145.62,0,0,1,92.4,107.81a51.33,51.33,0,0,0,15.88,68.47A50.91,50.91,0,0,1,85,169.86c0,.21,0,.43,0,.65a51.31,51.31,0,0,0,41.15,50.28,51.21,51.21,0,0,1-23.16.88,51.35,51.35,0,0,0,47.92,35.62,102.92,102.92,0,0,1-63.7,22A104.41,104.41,0,0,1,75,278.55a145.21,145.21,0,0,0,78.62,23"
fill="#1da1f2" />
</svg>
<div>Follow on Twitter</div>
</a> -->
<p>This site aims to provide simplest possible examples of HTML, CSS and JavaScript.</p>
<p>There are shortcuts for many of these pages (see
<a href="shortcuts" title="Full list of redirect URL shortcuts">full list</a>). For example,
<a href="https://simpl.info/v" title="Video element demo">simpl.info/v</a> redirects to
<a href="https://simpl.info/video" title="Video element demo">simpl.info/video</a>.</p>
<p>A list of web development resources is available from
<a href="http://bit.ly/webdevres" title="Document with links to web development resources">bit.ly/webdevres</a>.</p>
<p class="borderBelow">Submit bug reports, requests and comments at
<a href="https://github.com/samdutton/simpl" title="simpl.info github repo">github.com/samdutton/simpl</a>.</p>
<div id="links">
<a href="xhr" title="Ajax (aka XMLHttpRequest) example">Ajax (aka XMLHttpRequest)</a>
<a href="appcache" title="Application Cache">AppCache</a>
<a href="array" title="Array methods">Array methods: some, every, filter, forEach, map</a>
<a href="audio" title="Audio element"><audio></a>
<a href="audiodata" title="Audio Data API">Audio Data</a>
<a href="battery" title="Battery API">Battery API</a>
<a href="canplaytype" title="canPlayType()">canPlayType()</a>
<a href="canvas" title="Canvas element example"><canvas></a>
<a href="cors" title="CORS demo, using XMLHttpRequest">CORS with XHR</a>
<a href="imageset" title="CSS image-set() example">CSS background image-set()</a>
<a href="cssfilters" title="CSS filters">CSS filters</a>
<a href="flexboxcenter" title="CSS Flexbox center">CSS Flexbox: center</a>
<a href="flexboxexpand" title="CSS Flexbox expand-to-fit example">CSS Flexbox: expand to fit</a>
<a href="grid" title="CSS Grid simple example">CSS Grid: simple example</a>
<a href="gridpage" title="CSS Grid page layout example">CSS Grid: page layout</a>
<a href="imageset" title="CSS image-set() example">CSS image-set()</a>
<a href="cssnegativeselector" title="CSS negative selector example">CSS negative selector</a>
<a href="cssregions" title="CSS regions example">CSS regions</a>
<a href="csstextindent" title="CSS text-indent example">CSS text-indent</a>
<a href="csstransition" title="CSS transition example">CSS transition</a>
<a href="rtcdatachannel" title="RTCDataChannel example">Data channels</a>
<a href="datalist" title="Input datalist element example"><datalist></a>
<a href="details" title="Details/summary element example"><details> and <summary></a>
<a href="devicemotion" title="Device Motion example">Device Motion</a>
<a href="deviceorientation" title="Device Orientation example">Device Orientation</a>
<a href="eme/clearkey" title="EME Clear Key example">Encrypted Media Extensions (EME) Clear Key</a>
<a href="es6-modules" title="ES6 modules demo">ES6 modules</a>
<a href="eventsource" title="EventSource (Server-Sent Events) example">EventSource (aka Server-Sent Events)</a>
<a href="fetch" title="Fetch API example">Fetch</a>
<a href="localstorage" title="Fieldset example">Fieldset (localStorage example)</a>
<a href="filesystem" title="FileSystem example">FileSystem</a>
<a href="filesystem/blob" title="FileSystem example using the Blob API">FileSystem using Blob</a>
<a href="fullscreen" title="Fullscren">Fullscreen</a>
<a href="search/lunr" title="Fullscren">Full text offline search with Elasticlunr</a>
<a href="search/pouchdb" title="Fullscren">Full text offline search with PouchDB</a>
<a href="geolocation" title="Geolocation example">Geolocation</a>
<a href="https://www.simpl.info/getusermedia" title="getUserMedia() example">getUserMedia</a>
<a href="https://www.simpl.info/getusermedia/constraints" title="getUserMedia() example with constraints">getUserMedia: choose resolution</a>
<a href="https://www.simpl.info/getusermedia/sources" title="getUserMedia() example using mediaDevices.enumerateDevices()">getUserMedia: select camera and microphone</a>
<a href="history" title="History method example">History pushState() and popState()</a>
<a href="softhyphen" title="Soft hyphen (&shy;) example">Hyphenation (soft hyphen)</a>
<a href="iframe" title="iframe element example"><iframe></a>
<a href="bigimage" title="Example of an image with large file size">Image: a big one (20MB)</a>
<a href="imageset" title="CSS image-set() example">image-set()</a>
<a href="cdnimage" title="Example of CDN choosing the best image format depending on device capability">Image choice by CDN</a>
<a href="imagecapture" title="ImageCapture example: take a photo">ImageCapture</a>
<a href="idbkeyval" title="IndexedDB IDB-Keyval example">IndexedDB: IDB-Keyval</a>
<a href="inputnames" title="Examples of input elements with different names">Input name attributes</a>
<a href="inputtypes" title="Examples of input elements with different types">Input types: email, tel, url, date, time, colour</a>
<a href="install" title="beforeinstallprompt deferral example">Install prompt handling</a>
<a href="intersectionobserver" title="Intersection Observer example">Intersection Observer</a>
<a href="lazy" title="Using Intersection Observer to lazy load images">Intersection Observer: lazy load images</a>
<a href="localstorage" title="localStorage">localStorage</a>
<a href="mediacapture" title="Media Capture API">Media Capture (using <input>)</a>
<a href="mediafragments" title="Media Fragments API">Media Fragments</a>
<a href="mediaqueries" title="Media Queries demo">Media Queries</a>
<a href="mse" title="Media Source Extensions example">Media Source Extensions (MSE)</a>
<a href="getusermedia/sources" title="getUserMedia() example using mediaDevices.enumerateDevices()">mediaDevices.enumerateDevices()</a>
<a href="mediarecorder" title="MediaStream Recording API">MediaRecorder</a>
<a href="es6-modules" title="ES6 modules demo">ES6 modules</a>
<a href="mutationobserver" title="MutationObserver example">MutationObserver</a>
<a href="observe" title="Object.observe() example">Object.observe()</a>
<a href="navigationtiming" title="Navigation Timing demo">Navigation Timing (window.performance)</a>
<a href="useragent" title="navigator.userAgent">navigator.userAgent</a>
<a href="online" title="Online API example">navigator.online</a>
<a href="notification" title="Notification API example">Notification</a>
<a href="pagevisibility" title="Page Visibility API example">Page Visibility API</a>
<a href="pictureart" title="Picture element art direction example"><picture> for art direction</a>
<a href="picturetype" title="Picture element alternative sources example"><picture> with alternative file types</a>
<a href="postmessage" title="postMessage() example">postMessage()</a>
<a href="promises" title="Promises example">promises</a>
<a href="queryselector" title="querySelector() and querySelectorAll() examples">querySelector() and querySelectorAll()</a>
<a href="resourcetiming" title="Resource Timing demo">Resource Timing</a>
<a href="rtcdatachannel" title="RTCDataChannel">RTCDataChannel (WebRTC)</a>
<a href="rtcpeerconnection" title="RTCPeerConnection">RTCPeerConnection (WebRTC)</a>
<a href="getusermedia/screencapture" title="getUserMedia screen capture example">Screen capture</a>
<a href="scrollintoview" title="scrollIntoView() example">scrollIntoView()</a>
<a href="eventsource" title="EventSource (Server-Sent Events) example">Server-Sent Events (aka EventSource)</a>
<a href="serviceworker" title="sessionStorage example">ServiceWorker</a>
<a href="sizeswvalues" title="img element: sizes attribute with srcset using w values">sizes attribute with srcset using w values</a>
<a href="sessionstorage" title="sessionStorage example">sessionStorage</a>
<a href="singleton" title="singleton module example">singleton class using a module</a>
<a href="srcsetwvalues" title="img element with srcset attribute using w values">srcset: using w values with <img></a>
<a href="srcsetxvalues" title="img element with srcset attribute using x values">srcset: using x values with <img></a>
<a href="stt" title="Web Speech API: speech to text">speech recognition</a>
<a href="tts" title="Web Speech API: text to speech">speech synthesis</a>
<a href="svg" title="SVG example">SVG</a>
<a href="template" title="HTML Template Element"><template></a>
<a href="track" title="Track element"><track> with <video></a>
<a href="track/audio" title="Track element for audio"><track> with <audio></a>
<a href="track/map" title="Track element with synchronised metadata"><track> to synchronise video playback with Google Maps & Street View display</a>
<a href="useragent" title="User agent example">user agent</a>
<a href="vibrate" title="navigator.vibrate() example">Vibrate</a>
<a href="video" title="Video element"><video> with autoplay</a>
<a href="videoalpha" title="Video with alpha transparency"><video> with alpha transparency</a>
<a href="video/events" title="All video element events"><video> events</a>
<a href="video/scripted" title="Video with scripted playback"><video> with scripted playback</a>
<a href="longvideo" title="Long video example (~380MB)">long video (~380MB)</a>
<a href="video/multi" title="20+ video elements">multiple video elements</a>
<a href="videomedia" title="Video media query attribute">video with src media query</a>
<a href="video/overlay" title="Long video example (~380MB)">video with <div> overlay</a>
<a href="video/preloadnone" title="Video with preload none attribute value">video with preload="none"</a>
<a href="video/range" title="Video range request using the Fetch API">video range request</a>
<a href="video/resize" title="Video resize demo">video resizing demo</a>
<a href="webanimations" title="Web Animations">Web Animations</a>
<a href="webaudio" title="Web Audio">Web Audio</a>
<a href="webfonts" title="Web fonts">Web Fonts</a>
<a href="webgl" title="Fullscren">WebGL</a>
<a href="webp" title="WebP">WebP</a>
<a href="webrtc" title="WebRTC home">WebRTC (getUserMedia, RTCPeerConnection, RTCDataChannel)</a>
<a href="websocket" title="WebSocket">WebSocket</a>
<a href="stt" title="Web Speech API: speech to text">Web Speech: speech recognition</a>
<a href="tts" title="Web Speech API: text to speech">Web Speech: speech synthesis</a>
<a href="websql" title="WebSQL">WebSQL</a>
<a href="webworkers" title="Web Workers example">Web Workers</a>
<a href="xhr" title="XMLHttpRequest (aka Ajax) example">XMLHttpRequest (aka Ajax)</a>
</div>
<a href="https://github.com/samdutton/simpl/blob/gh-pages/index.html" title="View source for this page on GitHub" id="viewSource">View source on GitHub</a>
<script>
if (navigator.serviceWorker) {
navigator.serviceWorker.register('sw.js').catch(error => {
console.error('Unable to register service worker.', error);
});
}
</script>
</div>
<!-- container -->
</body>
</html>