-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.html
1282 lines (1246 loc) · 46.4 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
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Kitchen Sink : HTML</title>
<meta name="some_user_defined" content="some user specified value" />
<link rel="stylesheet" href="./styles/external.css" media="screen" />
<link rel="author" href="thomasapowell.html" />
<!-- set a base tag if y ou want to create a base URL for everything to prefix with
for example <base href="https://ucsd.edu" />
-->
<style>
.internalExample {
background-color: yellow;
font-style: italic;
}
</style>
</head>
<body id="top">
<header>
<img src="./images/kitchen_sink.png" alt="Kitchen Sink" />
<h1>Kitchen Sink Web Tech</h1>
<nav id="navbar">
<ul>
<li><a href="#linkdemos">Link</a></li>
<li><a href="#linkdemos">Link</a></li>
<li><a href="#linkdemos">Link</a></li>
<li><a href="#linkdemos">Link</a></li>
</ul>
</nav>
</header>
<hr />
<main>
<!-- The structure of an HTML document should include many block elements that define the
sections of the document. The inherent structure of a document inferred from the correct
usage of semantic sectioning elements has both search engine optimization (SEO) benefits
as well as provides appropriate clues for outling tools and assisistive access technologies
such as screen readers. -->
<article>
<header>
<h2>The HTML Kitchen Sink</h2>
<p>
We threw every HTML tags into a <del>sink</del>
<ins>document</ins> so you could learn them quickly!
</p>
</header>
<hr />
<section>
<h3>Introduction</h3>
<p>
The HTML markup language is nearly 30 years old and over its
lifetime it is grown significantly in complexity. However, at the
same time web professionals have often skipped over learning basic
HTML first in favor of immediately exploring design or programming
frameworks. While such a choice would seem appropriate to get hands
on experience, skipping markup basics can be limiting resulting in
confusion or even . It is our hope that by approaching HTML using it
is understandable that we would want to get things done.
</p>
</section>
<section>
<h3>
<a
href="https://html.spec.whatwg.org/multipage/syntax.html#comments"
>
Comments
</a>
</h3>
<p class="syntax">
HTML comments are the form of
<code><!-- an HTML comment --></code>.
</p>
<!-- an HTML comment -->
<p class="warning">
With HTML comments be careful with embedding the -, !, > and <
characters.
</p>
<p class="tip">
HTML comments are useful for documenting features, showing
authorship
</p>
<p class="warning">
HTML comments are seen by anyone who looks at the page source as
such page authors are warned to avoid putting sensitive information
in them or to strip the comments during a
<a href="">minification</a> process.
</p>
<p class="tip">
HTML comments can be used to insert content that is inert and have
it extracted using JavaScript. The use of
<code>data-*</code> attributes, a <code>template</code> element or
string literals or other data format within a
<code>script</code> block is a preferred way to embed such data
payloads.
</p>
</section>
<section>
<h3>
<a
href="https://html.spec.whatwg.org/multipage/syntax.html#character-references"
>
Character Entities
</a>
</h3>
<p>
A few example entities are < (less than &lt;), > (greater
than &gt;, & (ampersand &amp;, © (copyright
&copy;) and numeric entities like ☺ (a unicode smile).
Many many entities exist the main point is to understand the syntax
and look up the symbol needed.
</p>
</section>
<section>
<h4>
<a
href="https://html.spec.whatwg.org/multipage/semantics.html#the-root-element"
>
The Document Element
</a>
</h4>
<p>
The <code>html</code> element surrounds the complete document and is
the root of the parse tree.
</p>
<p>
The two allowed elements within the <code>html</code> element are
the <code>head</code> element where we keep information about the
page and its content and the <code>body</code> element which
contains the actual content itself.
</p>
</section>
<section>
<h4>
<a
href="https://html.spec.whatwg.org/multipage/semantics.html#document-metadata"
>
The Document Metadata
</a>
</h4>
<p>
The <code>meta</code>tag will be found in the head which is often
used to set the character set of the document which should be the
first thing set. (See the head of the document) The
<code>meta</code> tag also can be used to set keywords, simulate the
equivalent of HTTP response headers and other configuration duties.
</p>
<p>
The <code>head</code> should contain a <code>title</code> tag which
is the only mandatory HTML element for a document. The title should
be set to a descriptive value as it is used in book marks and
search.
</p>
<p>
The <code>head</code> may also contain a variety of
<code>link</code> tags which may be used to asscoiated a style sheet
or define various navigational relationships. The style of this
<span class="externalExample"
>element was set by an exeternal style sheet</span
>. We also can use a <code>style</code> element in the
<code>head</code> itself. This
<span class="internalExample"
>element style was set by an internal style block</span
>. The global attribute <code>style</code> also set
<span style="background-color: lime">style information inline</span
>. The choice between linked, document wide, or inline style varies
based upon interest in performance and maintainability. Generally
you are encouraged to separate concerns as much as possible.
</p>
</section>
<section>
<h4>
<a href="https://html.spec.whatwg.org/multipage/sections.html">
Sections
</a>
</h4>
<p>
The content of the page will be found in the
<code>body</code> element.
</p>
<p>
If the content or portion of the content is a stand-alone unit of
content as an article it should be found within the
<code>article</code> element. Look at line 35 this document is a
complete article. Notice it is found in the
<code>main</code> element as well. There is some degree of confusion
around <code>main</code>, <code>section</code> and
<code>article</code> in terms of encapsulation so be aware of how
you might use them.
</p>
<p>
The <code>section</code> element has been used heavily in the
document as is used to break up content in chunks. It is a bit more
semantic than <code>div</code> which is even more generic.
</p>
<p>
Navigation items particular for site or section navigation should be
found within a <code>nav</code> element as the "navbar" above
demonstrates.
</p>
<p>The next element is wonderful for non-linera thinkers lie me.</p>
<aside>
The Professor really <em>loves</em> <code>aside</code> tags and
asides in general as they tend to reveal the non-linear thinking
patterns which can lead to interesting insights.
</aside>
<p>
Headings ranging from <code>h1</code> to <code>h6</code> should be
used to outline content. The document has been using them
agressively, but as a sample here are the headings repeated.
</p>
<section>
<h2>
Remember, only one <code><h1></code> per document, this is
an <code><h2></code>
</h2>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>
</section>
<p>
Headings used to be grouped together using the
<code>hgroup</code> element to limit the outlining function. However, as a living language
some elements like &hgroup> might start out standard, disappear, come back and then finally go away for good.
</p>
<section>
<header>
<h2>Heading</h2>
<p>Subheading</p>
</header>
<p>
The <code><hgroup></code> element is no longer used, it is
recommended you not use <code>h*</code> elements for subheadings,
instead opting for <code>p</code> elements
</p>
</section>
<p>
When creating sections you may wish to specify the
<code>header</code> and <code>footer</code>. This sectioning
elements can appear for the whole document or individually within
sections.
</p>
<section>
<header>Header</header>
<p>Section body</p>
<footer>Footer</footer>
</section>
<p>
A special section element <code>address</code>is often
<a href="#address_element">found at the bottom of the document</a>
that sets the contact information or address of the organization
responsible for the document.
</p>
</section>
<section>
<h3>
<a
href="https://html.spec.whatwg.org/multipage/grouping-content.html"
>Grouping Content</a
>
</h3>
<p>
A variety of content grouping elements are found in HTML. The most
commonly used is the generic <code>div</code> element. A more
meaningful element <code>p</code> is used to deliinate
<a href="#" onclick="window.location='https://ucsd.edu'"
>go to foo</a
>paragraphs.
</p>
<p id="foo">
When breaking apart sections we may wish to employ the void element
<code>hr</code> to insert a horizontal rule like so.
</p>
<hr />
<p>
A <code>blockquote</code> element is useful to to quote large
amounts of content. A smaller quotation should be placed inline
using a <code>q</code> element.
</p>
<blockquote>
Far out in the uncharted backwaters of the unfashionable end of the
Western Spiral arm of the Galaxy lies a small unregarded yellow sun.
<cite
>The <a id="word3">Hitchhiker</a>'s Guide to the Galaxy, Douglas
Adams</cite
>
</blockquote>
<p>
HTML supports a variety of list elements including both unordered
(<code>ul</code>) and ordered (<code>ol</code>) lists. In either
list case individual items are specificed using the list item
(<code>li</code>) element. A specialized definition list is often
used in glossary style lists and uses the
<code>dt</code> (definition term) and <code>dd</code> (definition)
within a <code>dl</code> definition list.
</p>
<ul>
<li>
Unordered 1
<ol>
<li>Ordered 1</li>
<li>Ordered 2</li>
</ol>
</li>
<li>Unordered 3</li>
<li>Unordered 4</li>
</ul>
<dl>
<dt>Dingus</dt>
<dd>A fake word for a gadget or doo-dad.</dd>
<dt>Widget</dt>
<dd>A fake word like a dingus or gadget</dd>
</dl>
<p>
A specialized <code>menu</code> element is supposed to be employed
when the items are interactive as shown here.
</p>
<menu>
<li><button onClIcK="alert('New document')">New</button></li>
<li><button onclick="alert('Open document')">Open</button></li>
<li><button onclick="alert('Quit')">Quit</button></li>
</menu>
<p>
When source code or other preformatted content should be include and
white space should be preserved use the <code>pre</code> tag
</p>
<pre>
let school = 'UCSD';
/**
* helloJSWorld - the prototypical example complete with opinoniated mistakes!
*/
function helloJSWorld() {
// say hello as one would
alert(`Hello World students at ${school}!`);
} /* helloJSWorld */
helloJSWorld();
</pre>
<p>
A figure is a semantic way to insert something like a chart or
picture.
</p>
<figure>
<img
src="./images/chart.png"
alt="Scatter showing distributions of HTML elements with a long tail double peek around 300 and 400"
/>
<p>
Source:<cite
><a href="https://almanac.httparchive.org/en/2019/markup"
>Web Almanac</a
></cite
>
</p>
<figcaption>HTML Element frequencies circa 2019</figcaption>
</figure>
<div>
<p>
Some of the most used and abused tags in HTML are clearly
<code>div</code> and <code>span</code>. The
<span>really don't mean much</span> and are just used to
<span>group items and <em>elements</em> together</span> for some
author defined purpose.
</p>
<p>
In years past pundits would bemoan the lack of semantics that
table laden sites exhibited. It seems in the modern area we don't
worry about that and just put <code>div</code> or
<code>span</code> around it
</p>
<div>
<div>
I could have been a <span>contender</span>! Yet without anything
else I am just a plain old block or inline box.
</div>
<div class="jumbotron hero slide">
Who knows maybe with some classes and a framework I'll get some
style and action!
</div>
<div>
<div class="warn">Careful!</div>
<div class="msg">
You can easily start getting a
<div class="danger">
chronic case of
<div class="inner">Divitis</div>
</div>
<div>
It sure looks semantic
<div class="a1 b2 c3">but it</div>
reall
<div class="as3432424 as42312">isn't!</div>
No where have I seen delicious markup like this?
<div>
Don't over <em>react</em> it is a truthful point, just few
your rendered source and enjoy the result as well as
potentially nasty SEO, performance and a11y penalties
unless you do even more work.
</div>
<div>
Use the platform isn't just a JavaScript rallying cry it
works for markup too!
</div>
<!-- this kind of nest isn't that crazy actually -->
</div>
</div>
</div>
</div>
</div>
</section>
<section>
<h3>Text Level Elements</h3>
<p>
There are
<a
href="https://html.spec.whatwg.org/multipage/text-level-semantics.html"
>many inline text elements</a
>. Things get a little iffy here for HTML novices because the
default renderings can encourage you to think presentationally as
opposed to semantically. Resist the pull to the dark side of markup
and keep things logical applying look later with CSS!
</p>
<section>
<em> - <em>Emphasis</em><br />
<strong> - <strong>Strong</strong><br />
<small> - <small>Small</small><br />
<s> - <s>Strike</s> is or isn't suggested, careful with it<br />
<cite> - <cite>Citation</cite><br />
<q> - <q>Quote</q><br />
<dfn> - Pedantic - <dfn>needless display of knowledge</dfn>
<br />
<abbr> - <abbr>UCSD</abbr> is an abbreviation of University of
California, San Diego<br />
<ruby> -
<ruby
>Ruby<rp>(</rp>
<rt>Ruby Text</rt>
<rp>)</rp> </ruby
><br />
<data> - <data value="111234.0345">111234</data>
<!-- this could be useful!? --><br />
<time> -
<time datetime="2019-12-12">Thu, 12 Dec 2019 19:24:33 +0000</time
><br />
<code> - <code>code</code>
<!-- this is often used with tech content --><br />
<var> - <var>Variable</var><br />
<samp> - <samp>Sample</samp><br />
<kbd> - <kbd>Keyboard</kbd><br />
<sub> - <sub>Subscript</sub><br />
<sup> - <sup>Superscript</sup><br />
<!-- careful with these they are often discouraged -->
<i> - <i>Italic</i><br />
<b> - <b>Bold</b><br />
<u> - <u>Underline</u><br />
<mark> - <mark>Mark</mark><br />
<bdi> - TODO: the bdi element<br />
<bdo> - TODO: the bdo element<br />
<span> - <span>spaned text in here</span><br />
<br> - Line break ahead!<br /><br />
<p>
Sometimes you want a line break and sometimes you don't. Why not
insert an element to tell the browser where you are ok breaking
within_some_<wbr />very_long_bit_of_unbreakable_text_that_is_way_too_<wbr />_and_should_not_be_used_as_it_is_getting_totally_out_of_control!
</p>
</section>
</section>
<section>
<h3>Links - Putting the Hyper in HyperText!</h3>
<p>
Links can link <a href="https://ucsd.edu">offsite</a> within a
document to jump you <a href="#top">up</a> and
<a href="#foot">down a page.</a>
</p>
<p>
Links can use non-HTTP style URLs
<a href="mailto:fakeuser@example.com">fakeuser@example.com</a> and
can be both outbound and
<a href="#foot" id="linkdemos">go to the footer and jump back</a>
</p>
<p>
Links when defined with the <code>link</code> element can be quite
interesting look at the head for a few for CSS or explore ideas like
prefetching with this tag.
</p>
</section>
<section>
<header>
<h3>Editing</h3>
<p>
Just two elements have
<a href="https://html.spec.whatwg.org/multipage/edits.html"
>their own section</a
>
for some reason?
</p>
</header>
<p>
The two elements <code>ins</code> and <code>del</code> can be used
to indicated content which has been <ins>inserted</ins> or
<del>deleted</del>. Important attributes for these elements help us
provide indications about when a <del>deletion</del>
<ins>or insertion occurred</ins> and potentially reasons why such
<ins cite="somereference.html">modifications where made.</ins>
</p>
</section>
<section>
<h3>Embedded Content</h3>
<a href="https://html.spec.whatwg.org/multipage/embedded-content.html"
>specification</a
>
<!-- picture, source and image -->
<a href="https://html.spec.whatwg.org/multipage/images.html"
>More information on images</a
>
<!-- TODO: add more interesting image and picture examples to demonstrate types and source sets this can come with the image content shortly -->
</section>
<section>
<a
href="https://html.spec.whatwg.org/multipage/iframe-embed-object.html"
>Iframe, Embed, Object specification</a
>
<!-- TODO: add more for iframes, embed, object, and param-->
<iframe src="https://www.ucsd.edu" height="400" width="200"></iframe>
</section>
<section>
<a href="https://html.spec.whatwg.org/multipage/media.html"
>Media specification</a
>
<!-- TODO: video, audio, track demos-->
</section>
<section>
<header>
<h3>Image Maps</h3>
<p>An old technique that is actually somewhat useful</p>
</header>
<p>
An image map using the
<a href="https://html.spec.whatwg.org/#image-maps"
><map> and <area></a
>
tags allows us to make an image where different pieces are clickable
and goes to different places as opposed to a single portion of the
image being the click zone.
</p>
<h4>Image has <em>hostpots</em> using an imagemap</h4>
<img
id="imgUCSD"
alt="UCSD image map"
src="./images/imagemap.jpg"
usemap="#logosmap"
height="400"
width="600"
/>
<map name="logosmap">
<area
shape="rect"
coords="0,0,600,165"
href="https://ucsd.edu/"
alt="UCSD"
target="_blank"
/>
<area
shape="rect"
coords="0,184,280,369"
href="https://cse.ucsd.edu/"
alt="UCSD CSE"
target="_blank"
/>
<area
shape="rect"
coords="310,185,600,369"
href="https://datascience.ucsd.edu/"
alt="UCSD Data Science"
target="_blank"
/>
</map>
</section>
<section>
<h3>Math!? I thought this was Markup</h3>
<p>
<a
href="https://html.spec.whatwg.org/multipage/embedded-content-other.html"
>MathML</a
>
is
<a href="https://caniuse.com/#feat=mathml">more supported</a> now,
<strong
><mark
>but
<a href="https://caniuse.com/#feat=mathml"
>not in Chrome (yet)!</a
></mark
></strong
>. Well depending on your discipline you might want to know how to
use MathML and polyfill it if need be.
</p>
<math>
<mtext> Theorem 1: </mtext>
<mtext>
 
<!--THIN SPACE-->
</mtext>
<mtext>
  
<!--space of width 5/18 em-->
</mtext>
<mtext> Pythagorean theorem:   </mtext>
<mrow>
<mrow>
<msup>
<mi>x</mi>
<mn>2</mn>
</msup>
<mo>+</mo>
<msup>
<mi>y</mi>
<mn>2</mn>
</msup>
</mrow>
<mo>=</mo>
<msup>
<mi>z</mi>
<mn>2</mn>
</msup>
</mrow>
</math>
<br />
<br />
<math>
<mrow>
<mrow>
<mfrac>
<mrow>
<mn>1</mn>
<mo>+</mo>
<msqrt>
<mn>9</mn>
</msqrt>
</mrow>
<mn>2</mn>
</mfrac>
</mrow>
<mo>=</mo>
<mn>2</mn>
</mrow>
</math>
<br />
<br />
<math>
<mrow>
<mrow>
<mrow>
<mn>2</mn>
<mo>⁢</mo>
<mi>x</mi>
</mrow>
<mo>+</mo>
<mi>y</mi>
<mo>-</mo>
<mi>z</mi>
</mrow>
<mo>></mo>
<mn>16</mn>
</mrow>
</math>
<br />
<br />
<math>
<mrow>
<mrow>
<mi>f</mi>
<mo
>⁡
<!--FUNCTION APPLICATION-->
</mo>
<mo>(</mo>
<mi>x</mi>
<mo>)</mo>
</mrow>
<mo>=</mo>
<mrow>
<msup>
<mrow>
<mo>(</mo>
<mrow>
<mi>x</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
<mo>)</mo>
</mrow>
<mn>4</mn>
</msup>
<mo>=</mo>
<mrow>
<msup>
<mi>x</mi>
<mn>4</mn>
</msup>
<mo>+</mo>
<mrow>
<mn>4</mn>
<mo
>⁢
<!--INVISIBLE TIMES-->
</mo>
<msup>
<mi>x</mi>
<mn>3</mn>
</msup>
</mrow>
<mo>+</mo>
<mrow>
<mn>6</mn>
<mo
>⁢
<!--INVISIBLE TIMES-->
</mo>
<msup>
<mi>x</mi>
<mn>2</mn>
</msup>
</mrow>
<mo>+</mo>
<mrow>
<mn>4</mn>
<mo
>⁢
<!--INVISIBLE TIMES-->
</mo>
<mi>x</mi>
</mrow>
<mo>+</mo>
<mn>1</mn>
</mrow>
</mrow>
</mrow>
</math>
</section>
<section>
<h3>SVG is native and the heart of dataviz</h3>
<p>
<a
href="https://html.spec.whatwg.org/multipage/embedded-content-other.html"
>SVG</a
>
is very well <a href="https://caniuse.com/#feat=svg">supported</a>.
This XML derived markup language powers charting libraries from
<a href="https://amcharts.com">AmCharts</a> to
<a href="https://zingchart.com">ZingChart</a> and of course
everyone's favorite <a href="https://d3js.org">D3</a>.
</p>
<svg width="800" height="400">
<circle
cx="50"
cy="50"
r="40"
stroke="black"
stroke-width="3"
fill="red"
/>
<rect
x="150"
y="50"
rx="20"
ry="20"
width="250"
height="75"
fill="yellow"
stroke="blue"
stroke-width="10"
/>
<polygon
points="300,10 350,30 260,80 310,40"
fill="blue"
stroke="red"
stroke-width="5"
/>
</svg>
</section>
<section>
<h3>Table Time!</h3>
<p>
HTML tables used to be the backbone of design, today they are back
to their normal use. Given that data powers our world we should
(re)discover what features HTML tables provide and then and only
then turn to libraries to help us present data in a tabular manner.
Understand that if we want to interact with data we call that a
<em>datagrid</em> which is a different thing all together. For now
datagrids are not native in HTML, but libraries like
<a href="https://handsontable.com">Handsontable</a> and
<a href="https://zinggrid.com">ZingGrid</a> can certainly address
that.
</p>
<table style="border: 1px solid black">
<caption>
Class Schedule
</caption>
<colgroup>
<col style="width: 150px" />
<col style="width: 100px" />
<col style="width: 100px" />
<col style="width: 100px; background-color: #97db9a" />
<col />
<col style="width: 100px" />
<col span="2" style="width: 50px; background-color: #97db9a" />
</colgroup>
<thead>
<tr>
<td rowspan="2"> </td>
<td colspan="5" style="text-align: center">Weekdays</td>
<td colspan="2">Weekend</td>
</tr>
<tr>
<th>Mon</th>
<th>Tues</th>
<th>Wed</th>
<th>Thurs</th>
<th>Fri</th>
<th>Sat</th>
<th>Sun</th>
</tr>
</thead>
<tbody>
<tr>
<th>8:00 AM</th>
<td>DSC 10</td>
<td> </td>
<td> </td>
<td>DSC 1</td>
<td>CSE 15L Lab</td>
<td> </td>
<td> </td>
</tr>
<tr>
<th>10:00 AM</th>
<td>DSC 10</td>
<td>DSC 10</td>
<td> </td>
<td>DSC 1</td>
<td>CSE 15L Lab</td>
<td> </td>
<td> </td>
</tr>
<tr>
<th>12:00 PM</th>
<td> </td>
<td>CSE 100</td>
<td> </td>
<td>DSC 1</td>
<td>CSE 15L Lab</td>
<td> </td>
<td> </td>
</tr>
<tr>
<th>2:00 PM</th>
<td> </td>
<td>DSC 10</td>
<td> </td>
<td>DSC 10</td>
<td>CSE 100</td>
<td> </td>
<td> </td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="8" style="text-align: center">Table footer</td>
</tr>
</tfoot>
</table>
</section>
<section>
<h3>Form Fun</h3>
<p>
Intearctive forms in HTML initially solely powered posting data to
server-side programs. Today forms are used to power complex client
side applications written in JavaScript. Much of the markup
complexity is found with the
<a href="https://html.spec.whatwg.org/multipage/input.html"
><code>input</code> element</a
>
which does many things. However, other
<a href="https://html.spec.whatwg.org/multipage/form-elements.html"
>form elements</a
>
can be quite complex themselves. Before moving on to JavaScript make
sure you fully understand all the
<a
href="https://html.spec.whatwg.org/multipage/form-control-infrastructure.html"
>details around form controls</a
>
otherwise you will have gaps in your knowlege and may run into
trouble or do needless scripting when you could just use platform
provided features directly.
</p>
<form
action="http://httpbin.org/post"
oninput="x.value=parseInt(mileage.value)"
method="POST"
name="registration"
>
<!-- hidden form fields don't show on screen and are often used for control information, they are inherently like all HTML elements modifable so be cautious in what you store in them -->
<input
type="hidden"
name="formId"
value="somenottrulyhiddenvalue"
/>
<fieldset>
<legend>Personal Information</legend>
<label for="name"> Name: </label>
<input type="text" name="name" id="name" autofocus />
<br />
<label> Gender: </label>
<label for="male"> Male </label>
<input
type="radio"
name="gender"
id="male"
value="male"
checked
/>
<label for="female"> Female </label>
<input type="radio" name="gender" id="female" value="female" />
<label for="other"> Other </label>
<input type="radio" name="gender" id="other" value="other" />
<br />
<label for="birth"> Date of birth: </label>
<input type="date" name="birth" id="birth" />
<br />
<label for="phone"> Phone number: </label>
<input type="tel" name="phone" id="phone" autocomplete="on" />
<br />
<label for="email"> Email: </label>
<input
type="email"
name="email"
id="email"
autocomplete="on"
required
/>
<br />
<label for="password"> Create password: </label>
<input
type="password"
name="password"
id="password"
autocomplete="on"
/>
<br />
<label for="ssn"> SSN: </label>
<input type="number" name="ssn" id="ssn" />
<br />
<label for="address"> Address: </label>
<input
type="text"
name="address"
id="address"
autocomplete="on"
/>
<label for="zip"> Zip code: </label>
<input
type="text"
name="zip"
id="zip"
pattern="[0-9]*"
maxlength="5"
autocomplete="on"
/>
<label for="state"> State: </label>