Notes for HTML - Overview - Condensed By Scott Granneman & Jans Carton Find the presentation at http://www.granneman.com/presentations/ ## Slide 2 Slides: https://granneman.com/downloads/web-dev/HTML-Overview-Condensed.pdf Notes: https://granneman.com/downloads/web-dev/HTML-Overview-Condensed.txt ## Slide 3 https://www.granneman.com/presentations/all-presentations ## Slide 5 Some HTML elements are conveniences for avoiding writing CSS (e.g., , , ) or for structure (
& ) Some CSS inserts content (e.g., ::before & ::after) or modifies behavior (e.g., animate & transition) Some JavaScript modifies HTML & CSS to change meaning or presentation, not for behavior Wikipedia contributors. “Separation of concerns”. Wikipedia, The Free Encyclopedia, 20 Mar. 2024, https://en.wikipedia.org/wiki/Separation_of_concerns. Web. 15 Apr. 2024. ## Slide 6 Some HTML elements are conveniences for avoiding writing CSS (e.g., , , ) or for structure (
& ) Some CSS inserts content (e.g., ::before & ::after) or modifies behavior (e.g., animate & transition) Some JavaScript modifies HTML & CSS to change meaning or presentation, not for behavior Wikipedia contributors. “Separation of concerns”. Wikipedia, The Free Encyclopedia, 17 June 2022, https://en.wikipedia.org/wiki/Separation_of_concerns. Web. 8 July 2022. ## Slide 8 HTML 4.01: Raggett, Dave et al. “Index of Elements”. World Wide Web Consortium [W3C]. HTML 4.01 Specification, 24 Dec 1999, https://www.w3.org/TR/html401/index/elements.html. Web. 24 Oct 2023. HTML5 Hickson, Ian et al. “4 The elements of HTML”. WHATWG. HTML Living Standard, 24 Oct 2023, https://html.spec.whatwg.org/#semantics. Web. 24 Oct 2023. MDN contributors. “HTML elements reference”. MDN Web Docs, 11 July 2023, https://developer.mozilla.org/en-US/docs/Web/HTML/Element. Web. 24 Oct 2023. 112 elements (as of 24 Oct 2023): a, abbr, address, area, article, aside, audio, b, base, bdi, bdo, blockquote, body, br, button, canvas, caption, cite, code, col, colgroup, data, datalist, dd, del, details, dfn, dialog, div, dl, dt, em, embed, fieldset, figcaption, figure, footer, form, h1, h2, h3, h4, h5, h6, head, header, hgroup, hr, html, i, iframe, img, input, ins, kbd, label, legend, li, link, main, map, mark, menu, meta, meter, nav, noscript, object, ol, optgroup, option, output, p, picture, pre, progress, q, rp, rt, ruby, s, samp, script, search, section, select, slot, small, source, span, strong, style, sub, summary, sup, table, tbody, td, template, textarea, tfoot, th, thead, time, title, tr, track, u, ul, var, video, wbr w3c. html.json. webref, commit 670aa860d2fedea6b7b3663e9a8f158b02dac81a, World Wide Web Consortium [W3C], 24 Mar 2023. GitHub, https://github.com/w3c/webref/blob/main/ed/elements/html.json. 29 obsolete elements (as of 24 Oct 2023): acronym, applet, basefont, bgsound, big, blink, center, dir, font, frame, frameset, isindex, keygen, listing, marquee, menuitem, multicol, nextid, nobr, noembed, noframes, param, plaintext, rb, rtc, spacer, strike, tt, xmp Hickson, Ian et al. “16.2 Non-conforming features”. WHATWG. HTML Living Standard, 24 Oct 2023, https://html.spec.whatwg.org/#non-conforming-features. Web. 24 Oct 2023. MDN adds 3 more obsolete elements: content, image, shadow MDN contributors. “Obsolete and deprecated elements”. MDN Web Docs, 11 July 2023, https://developer.mozilla.org/en-US/docs/Web/HTML/Element#obsolete_and_deprecated_elements. Web. 24 Oct 2023. ## Slide 9 HTML 4.01: Raggett, Dave et al. “Index of Elements”. World Wide Web Consortium [W3C]. HTML 4.01 Specification, 24 Dec 1999, https://www.w3.org/TR/html401/index/elements.html. Web. 24 Oct 2023. WHATWG. “4 The elements of HTML”. HTML Living Standard, 8 July 2022, https://html.spec.whatwg.org/#semantics. Web. 8 July 2022. MDN contributors. “HTML elements reference”. MDN Web Docs, 18 Feb. 2022, https://developer.mozilla.org/en-US/docs/Web/HTML/Element. Web. 3 Apr 2022. ## Slide 14 WHATWG. “4.1.1 The html element”. HTML Living Standard, 29 Mar. 2022, https://html.spec.whatwg.org/multipage/semantics.html#the-html-element. Web. 29 Mar. 2022. ## Slide 15 WHATWG. “4.2.1 The head element”. HTML Living Standard, 29 Mar. 2022, https://html.spec.whatwg.org/multipage/semantics.html#the-head-element. Web. 29 Mar. 2022. ## Slide 17 WHATWG. “4.3.1 The body element”. HTML Living Standard, 29 Mar. 2022, https://html.spec.whatwg.org/multipage/sections.html#the-body-element. Web. 29 Mar. 2022. MDN contributors. “: The Document Body element”. MDN Web Docs, 21 Apr 2022, https://developer.mozilla.org/en-US/docs/Web/HTML/Element/body. Web. 8 July 2022. ## Slide 22 Granneman, Scott. Linux Phrasebook, Second Edition. Indianapolis, IN: Addison-Wesley (2016). iii, 478. ## Slide 23 Full list of metadata elements: base, link, meta, noscript, script, style, template, title. Hickson, Ian et al. “3.2.5.2.1 Metadata content”. WHATWG, HTML Living Standard, 19 Mar 2023, https://html.spec.whatwg.org/multipage/dom.html#metadata-content. Web. 19 Mar 2023. ## Slide 24 WHATWG. “4.2.5 The meta element”. HTML Living Standard, 3 Feb. 2022, http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#the-meta-element. Web. 6 Feb. 2022. ## Slide 25 shrink-to-fit: Aderinokun, Ire. “The Problem with iOS Safari and shrink-to-fit”. bitsofcode, 5 Apr. 2016, https://bitsofco.de/ios-safari-and-shrink-to-fit/. Web. 30 Mar 2022. ## Slide 26 WHATWG. “4.2.2 The title element”. HTML Living Standard, 3 Feb. 2022, http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#the-title-element. Web. 6 Feb. 2022. ## Slide 27 The H.P. Lovecraft Wiki contributors. “The Call of Cthulhu”. The H.P. Lovecraft Wiki, 7 Apr. 2023, https://lovecraft.fandom.com/wiki/The_Call_of_Cthulhu. Web. 20 Apr. 2024. ## Slide 28 “On-Page Ranking Factors”. Moz, https://moz.com/learn/seo/on-page-factors. Web. 28 December 2021. “Title Tag”. Moz, https://moz.com/learn/seo/title-tag. Web. 28 December 2021. ## Slide 29 Granneman, Scott. “The title page of the 3rd edition of the Encyclopedia Brittanica [1797]”. Chainsaw on a Tire Swing, 4 July 2015, https://chainsawonatireswing.com/2015/07/04/title-page-of-3rd-edition-of-encyclopedia-brittanica/. Web. 21 December 2021. ## Slide 31 Dgar [@dgar@aus.social]. “A SEO expert walks into a bar, tavern, pub, grill, public house, irish bar, bartender, drinks, beer, wine, liquor.”. Mastodon. aus.social, 18 Mar. 2024, https://aus.social/@dgar/112117108915253951. Web. 18 Mar. 2024. MDRivet. “Crowd Laughing.wav”. Freesound, 9 Apr. 2015, https://freesound.org/people/MDRivet/sounds/269461/. Web. 18 Mar. 2024. Licensed CC0 1.0: https://creativecommons.org/publicdomain/zero/1.0/. ## Slide 34 “Inland Bearded Dragon”. Saint Louis Zoo, 1 Feb. 2019, https://web.archive.org/web/20190201120255/https://www.stlzoo.org/animals/abouttheanimals/reptiles/lizards/inlandbeardeddragon. Web. 6 Feb 2022. ## Slide 37 WHATWG. “4.3.6 The h1, h2, h3, h4, h5, and h6 elements”. HTML Living Standard, 29 Mar. 2022, http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements. Web. 29 Mar. 2022. MDN contributors. “

: The HTML Section Heading elements”. MDN Web Docs, 2 Feb. 2022, https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements. Web. 13 Feb 2022. ## Slide 38 WebSanity. “HTML: Simple Webpage, Corrected & No Deprecations”. CodePen, 20 Dec. 2021, https://codepen.io/websanity/pen/jOGwKxB?editors=1000. Web. 20 Dec. 2021. ## Slide 39 WebSanity. “HTML: Simple Webpage, Corrected & No Deprecations”. CodePen, 20 Dec. 2021, https://codepen.io/websanity/pen/jOGwKxB?editors=1000. Web. 20 Dec. 2021. ## Slide 41 Surowiecki, James. “Content and its Discontents”. The New Yorker, 20 Oct 2014, https://www.newyorker.com/magazine/2014/10/20/content-discontents. Web. 30 Jan 2022. ## Slide 42 AllMusic. “Ben Branch & The Operation Breadbasket Orchestra Songs, Albums, Reviews, Bio & More | AllMusic”. AllMusic, 2022, https://www.allmusic.com/artist/ben-branch-the-operation-breadbasket-orchestra-mn0000157434. Web. 30 Jan 2022. ## Slide 43 WHATWG. “4.4.1 The p element”. HTML Living Standard, 3 Feb. 2022, http://www.whatwg.org/specs/web-apps/current-work/multipage/grouping-content.html#the-p-element. Web. 6 Feb. 2022. MDN contributors. “

: The Paragraph element”. MDN Web Docs, 18 Feb. 2022, https://developer.mozilla.org/en-US/docs/Web/HTML/Element/p. Web. 3 Apr 2022. ## Slide 44 WebSanity. “HTML: p element”. CodePen, 1 May 2014, https://codepen.io/websanity/pen/zYBPmo?editors=1000. Web. 6 Feb 2022. ## Slide 46 WebSanity. “HTML: p element”. CodePen, 1 May 2014, https://codepen.io/websanity/pen/zYBPmo?editors=1000. Web. 6 Feb 2022. ## Slide 47 WebSanity. “HTML: p element”. CodePen, 1 May 2014, https://codepen.io/websanity/pen/zYBPmo?editors=1000. Web. 6 Feb 2022. ## Slide 48 WebSanity. “HTML: p element”. CodePen, 1 May 2014, https://codepen.io/websanity/pen/zYBPmo?editors=1000. Web. 6 Feb 2022. ## Slide 52 All will validate. 1st one is best because it’s easy to scan down your code & make sure you closed all start tags. 2nd is OK if you have a very short amount of content. 3rd one is bad form & makes no sense. ## Slide 57 Christian’s Rule When you save your file in your editor with auto-formatting on, it will format like this, which you do not want ## Slide 58 Free-floating text might not go in a

 — e.g., you might use a

,

, or
  •  — but it has to go into something ## Slide 59 “4.5.27 The br element”. HTML Living Standard, WHATWG, 3 Feb. 2022, http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-br-element. Web. 6 Feb. 2022. MDN contributors. “
    : The Line Break element”. MDN Web Docs, 2 Oct. 2021, https://developer.mozilla.org/en-US/docs/Web/HTML/Element/br. Web. 3 Apr 2022. ## Slide 60 WebSanity. “HTML: br element”. CodePen, 24 Apr. 2014,https://codepen.io/websanity/pen/YzWQEE?editors=1000. Web. 6 Feb 2022. Frost, Robert. Excerpt from “Stopping by Woods on a Snowy Evening”. Poetry Foundation, 5 Feb. 2022, https://www.poetryfoundation.org/poems/42891/stopping-by-woods-on-a-snowy-evening. Web. 6 Feb 2022. ## Slide 63 WebSanity. “HTML: br element - problems with 2 br in a row”. CodePen, 27 June 2020, https://codepen.io/websanity/pen/pogrqgv?editors=1100. Web. 6 Feb 2022. Lovecraft, H. P. Excerpt from“The Dunwich Horror”. Lovecraft Stories, http://www.lovecraft-stories.com/story/the-dunwich-horror. Web. 6 Feb 2022. FIXME change screenshots? ## Slide 64 WebSanity. “HTML: br element - problems with 2 br in a row”. CodePen, 27 June 2020, https://codepen.io/websanity/pen/pogrqgv?editors=1100. Web. 6 Feb 2022. Lovecraft, H. P. Excerpt from“The Dunwich Horror”. Lovecraft Stories, http://www.lovecraft-stories.com/story/the-dunwich-horror. Web. 6 Feb 2022. ## Slide 65 “13.1.2 Elements”. HTML Living Standard, WHATWG, 3 Feb. 2022, https://html.spec.whatwg.org/multipage/syntax.html#void-elements. Web. 6 Feb. 2022. MDN contributors. “Empty element”. MDN Web Docs, 7 Oct. 2021, https://developer.mozilla.org/en-US/docs/Glossary/Empty_element. Web. 3 Apr 2022. ## Slide 66 “13.1.2 Elements”. HTML Living Standard, WHATWG, 3 Feb. 2022, https://html.spec.whatwg.org/multipage/syntax.html#void-elements. Web. 6 Feb. 2022. MDN contributors. “Empty element”. MDN Web Docs, 7 Oct. 2021, https://developer.mozilla.org/en-US/docs/Glossary/Empty_element. Web. 3 Apr 2022. For more on void elements, see our presentations Web Development: The Absolute Basics & HTML Overview in Categorization ## Slide 67 The first
    adds additional new line to the start of the paragraph, which never makes sense (if you want additional margining above a paragraph, use CSS) With thanks to the great Ogden Nash TODO: CodePen this ## Slide 68 Chris’s Rule ## Slide 69 WebSanity. “HTML: Your first webpage”. CodePen, 30 June 2022, https://codepen.io/websanity/pen/yLKyxmr?editors=1000. Web. 30 June 2022. Smith, Linell Nash, editor. The Best of Ogden Nash. Chicago: Iver R. Dee (2007). 163. ## Slide 70 WebSanity. “HTML: Your first webpage”. CodePen, 30 June 2022, https://codepen.io/websanity/pen/yLKyxmr?editors=1000. Web. 30 June 2022. Smith, Linell Nash, editor. The Best of Ogden Nash. Chicago: Iver R. Dee (2007). 163. ## Slide 79 WHATWG. “4.3.6 The h1, h2, h3, h4, h5, and h6 elements”. HTML Living Standard, 29 Mar. 2022, http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements. Web. 29 Mar. 2022. MDN contributors. “

    : The HTML Section Heading elements”. MDN Web Docs, 2 Feb. 2022, https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements. Web. 13 Feb 2022. ## Slide 80 WebSanity. “Setting up a WebSanity Server: Linode”. WebSanity Tech Wiki, 2 Mar. 2016. Web. 2 Mar. 2016. Muller, Britney & the MOZ staff. “On-Page SEO”. MOZ, https://moz.com/beginners-guide-to-seo/on-page-seo. Web. 13 Feb 2022. FIXME add screenshot showing accessibility ## Slide 81 WebSanity. “Setting up a WebSanity Server: Linode”. WebSanity Tech Wiki, 2 Mar. 2016. Web. 2 Mar. 2016. Muller, Britney & the MOZ staff. “On-Page SEO”. MOZ, https://moz.com/beginners-guide-to-seo/on-page-seo. Web. 13 Feb 2022. ## Slide 82 WebSanity. “Setting up a WebSanity Server: Linode”. WebSanity Tech Wiki, 2 Mar. 2016. Web. 2 Mar. 2016. Muller, Britney & the MOZ staff. “On-Page SEO”. MOZ, https://moz.com/beginners-guide-to-seo/on-page-seo. Web. 13 Feb 2022. ## Slide 83 WebSanity. “Setting up a WebSanity Server: Linode”. WebSanity Tech Wiki, 2 Mar. 2016. Web. 2 Mar. 2016. Muller, Britney & the MOZ staff. “On-Page SEO”. MOZ, https://moz.com/beginners-guide-to-seo/on-page-seo. Web. 13 Feb 2022. ## Slide 84 WebSanity. “Setting up a WebSanity Server: Linode”. WebSanity Tech Wiki, 2 Mar. 2016. Web. 2 Mar. 2016. Muller, Britney & the MOZ staff. “On-Page SEO”. MOZ, https://moz.com/beginners-guide-to-seo/on-page-seo. Web. 13 Feb 2022. ## Slide 85 WebSanity. “HTML: h1–h6 elements”. CodePen, 25 Apr. 2014, http://codepen.io/websanity/pen/ptgzc. Web. 25 Apr. 2014. ## Slide 86 WHATWG. “4.3.6 The h1, h2, h3, h4, h5, and h6 elements”. HTML Living Standard, 29 Mar. 2022, http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements. Web. 29 Mar. 2022. MDN contributors. “

    : The HTML Section Heading elements”. MDN Web Docs, 2 Feb. 2022, https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements. Web. 13 Feb 2022. ## Slide 88 Daggett, John & Myles C. Maxfield & Chris Lilley. “3.5. Font size: the font-size property”. CSS Fonts Module Level 3, 20 Sept. 2018, https://www.w3.org/TR/css-fonts-3/#font-size-prop. Web. 30 Mar. 2022. ## Slide 89 Daggett, John & Myles C. Maxfield & Chris Lilley. “3.5. Font size: the font-size property”. CSS Fonts Module Level 3, 20 Sept. 2018, https://www.w3.org/TR/css-fonts-3/#font-size-prop. Web. 30 Mar. 2022. ## Slide 90 Muller, Britney & the MOZ staff. “On-Page SEO”. MOZ, https://moz.com/beginners-guide-to-seo/on-page-seo. Web. 13 Feb 2022. ## Slide 91 Butterick, Matthew. “Headings”. Butterick’s Practical Typography, 16 July 2023, https://practicaltypography.com/headings.html. Web. 1 Aug 2023. ## Slide 92 WHATWG. “3.2.5.2.4 Heading content”. HTML Living Standard, 8 July 2022, https://html.spec.whatwg.org/#heading-content. Web. 8 July 2022. ## Slide 93 Brealey, Richard A., Stewart C. Myers, & Franklin Allen. Principles of Corporate Finance, 10th Edition. New York: McGraw-Hill (2010). 9. ## Slide 100 WebSanity. “HTML: headings create implied sections”. CodePen, 3 Aug. 2020, https://codepen.io/websanity/pen/BwbYVp?editors=1000. Web. 3 Aug. 2020. ## Slide 101 WebSanity. “HTML: headings create implied sections”. CodePen, 3 Aug. 2020, https://codepen.io/websanity/pen/BwbYVp?editors=1000. Web. 3 Aug. 2020. ## Slide 103 WHATWG. “4.3.6 The h1, h2, h3, h4, h5, and h6 elements”. HTML Living Standard, 29 Mar. 2022, http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements. Web. 29 Mar. 2022. MDN contributors. “

    : The HTML Section Heading elements”. MDN Web Docs, 2 Feb. 2022, https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements. Web. 13 Feb 2022. ## Slide 104 WebSanity. “HTML: h1-h6 ordering”. CodePen, 25 Apr. 2014, http://codepen.io/websanity/pen/AoapB. Web. 25 Apr. 2014. ## Slide 107 Google gives extra weight to words inside headings; Google gives no extra weight to words inside paragraphs FIXME screenshot ## Slide 108 Hickson, Ian et al. “4.3.7 The hgroup element”. WHATWG, HTML Living Standard, 19 Mar 2023, https://html.spec.whatwg.org/multipage/sections.html#the-hgroup-element. Web. 19 Mar 2023. MDN contributors. “
    ”. MDN Web Docs, 23 Feb 2023, https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hgroup. Web. 19 Mar 2023. ## Slide 109 WebSanity. “HTML: hgroup element”. CodePen, 19 Mar 2023, https://codepen.io/websanity/pen/eYLLNPe?editors=1000. Web. 19 Mar 2023. ## Slide 110 WebSanity. “HTML: hgroup element, Britannica example”. CodePen, 19 Mar 2023, https://codepen.io/websanity/pen/mdGGJLY?editors=1000. Web. 19 Mar 2023. ## Slide 111 WebSanity. “HTML: hgroup element, Britannica example: Live Preview”. CodePen, 19 Mar 2023, https://codepen.io/websanity/live/mdGGJLY. Web. 19 Mar 2023. ## Slide 115 WebSanity. “HTML: 3 kinds of lists”. CodePen, 27 Nov. 2021, https://codepen.io/websanity/pen/bGobgBy?editors=1000. Web. 27 Nov. 2021. ## Slide 117 WHATWG. “4.4.8 The li element”. HTML Living Standard, 31 Mar. 2022, https://html.spec.whatwg.org/multipage/grouping-content.html#the-li-element. Web. 3 Apr 2022. MDN contributors. “
  • : The List Item element”. MDN Web Docs, 7 Nov. 2021, https://developer.mozilla.org/en-US/docs/Web/HTML/Element/li. Web. 3 Apr 2022. ## Slide 118 WebSanity. “HTML: ul, ol, & li elements”. CodePen, 26 Sept. 2019, https://codepen.io/websanity/pen/xxKeLeZ?editors=1000. Web. 26 Sept. 2019. ## Slide 120 WHATWG. “4.4.6 The ul element”. HTML Living Standard, 31 Mar. 2022, https://html.spec.whatwg.org/multipage/grouping-content.html#the-ul-element. Web. 3 Apr 2022. MDN contributors. “