This page intentionally left blank. ⬇️, ➡️, or spacebar 🛰 to start slidedeck. --- # HTML .center[![](/img/spingreenguy.gif)] --- # HTML - Needed to convey information over the internet - neutral way of writing that can be read by any application - based on SGML (Standard Generalized Mark-up Language) - a sibling to XML (eXtensible Mark-up Language) - was created for sharing documents --- # HTML5 - Like all languages, HTML has changed over time - Some things go away: `
` - Another example of the web changing: [Seasonal Restoration](https://blog.geocities.institute/archives/6620) - Many new attributes are added to make the web easier to view - expanded to handle more than just documents --- # Let's learn some elements ```html
My page
``` --- # HTML ## `` - holds everything together --- # Head and Body ## `` ## `` --- # Head ```html
Information in your browser tab
``` --- # Body ```html
Everything you see on the page
Everything you see on the page will go in the body of the HTML
``` --- # Heading tags ```html
``` --- # HTML5 Semantic elements ```html
``` ... and [more](https://guide.freecodecamp.org/html/html5-semantic-elements/) --- # Tables (spreadsheets on the web)
Row 1, column 1
Row 1, column 2
Row 1, column 3
Row 2, column 1
Row 2, column 2
Row 2, column 3
--- # Tables ```html
Row 1, column 1
Row 1, column 2
Row 1, column 3
Row 2, column 1
Row 2, column 2
Row 2, column 3
``` - [Mozilla web docs: Tables](https://developer.mozilla.org/en-US/docs/Learn/HTML/Tables/Basics) --- # Definition lists
Definition 1
Value 1
Definition 2
Value 1
--- # Definition lists ```html
Definition 1
Value 1
Definition 2
Value 1
``` --- # Lists ```html
List item in an unordered list
List item 2
List item in an ordered list
List item 2
``` --- # Lists, rendered
List item in an unordered list
List item 2
List item in an ordered list
List item 2
--- # Comments ## `` --- # Elements and Attributes - Everything we just covered were HTML **elements** - Elements can have **attributes** - Attributes are "key-value pairs" that fit inside HTML elements - The next few pages are examples --- # Linking ## `
Link text
` - `a` is the HTML element - `href` is the attribute - the website is the value of the attribute --- # Embedding images ## `
` - `img` is the HTML element - `src` ("source") is the attribute - the path to where the image is is `src`'s value - Note that this is one of the few "self-closing" elements --- # Embedded images and ALT text `
` - `alt` is the HTML attribute for images that provide screenreaders with a brief decsription of the word, or show up when the image itself cannot load --- Here's an example of what that looks like: With a bad URL:
With a good URL:
--- # What about that DOCTYPE? `` - "document type declaration" - lets the computer know what kind of file this is, even though your browser can probably guess --- # ...and more! There are many more elements and aspects to HTML than covered here; this is just an overview of some of the major concepts. --- class: middle .center[ # [Validate, validate, validate](https://validator.w3.org/)] --- # Things to remember - Most HTML elements need an "opening" and "closing" tags. - The exception to this is if they are "self-closing" (for elements that don't need any text content in between, like `img` or `br`) --- # Cheat sheets Use these to help remember syntax and rules! - [HTMLCheatSheet.com](https://htmlcheatsheet.com/) - [Stanford HTML Cheatsheet](https://web.stanford.edu/group/csp/cs21/htmlcheatsheet.pdf) (PDF) --- # Additional resources - [Mozilla web docs: Introduction to HTML](https://developer.mozilla.org/en-US/docs/Learn/HTML/Introduction_to_HTML) - [Definition Lists vs Tables (for accessibility)](https://snook.ca/archives/html_and_css/definition-lists-v-tables) --- # Learning more - [World Wide Web](/presentations/world-wide-web.html) - [XML](/presentations/xml.html) [Home](/)