├── .editorconfig ├── 01-rules ├── 01-fix-this-html.html ├── index.md └── under-construction.gif ├── 02-tables ├── 02-tables.html ├── example.png └── index.md ├── 03-nested-lists ├── 03-nested-lists.html ├── index.md └── lists_example.html ├── 04-sectioning-elements ├── 04-sectioning-elements.html ├── index.md ├── sectioning-elements.png └── sections.css ├── 05-all-elements ├── 05-all-elements.html └── index.md ├── 06-images ├── 06-images.html ├── img │ ├── cat_typing.webp │ ├── logo_onja.png │ ├── logo_onja.webp │ ├── logo_onja_disk.svg │ ├── onja_crew.jpg │ └── onja_crew.webp └── index.md ├── 07-weekend-blog └── index.md ├── 08-log-in-form ├── 08-log-in-form.html └── index.md ├── 09-correct-fields ├── 09-correct-fields.html ├── forms.css └── index.md ├── 10-form-to-sheets ├── 10-form-to-sheets.html └── index.md ├── 11-inline-markup ├── 11-inline-markup.html └── index.md ├── 12-clean-code ├── 12-clean-code.html └── index.md ├── 13-semantics ├── 13-semantics.html ├── index.md └── markup.png ├── 14-blog-design ├── 14-blog-design.html ├── blog_design.png └── index.md ├── 15-rich-media ├── 15-rich-media.html ├── audio │ ├── early-high_wails.ogg │ ├── late-high_wails-long.ogg │ ├── late-high_wails.ogg │ ├── moan.ogg │ └── purr.ogg ├── caption │ └── chip.vtt ├── css │ └── rich-media.css ├── index.md ├── js │ └── canvas.js └── video │ └── chip.mp4 ├── 16-project-html └── index.md ├── README.md ├── fork-button.png └── template.html /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # See: editorconfig.org 4 | 5 | root = true 6 | 7 | [*] 8 | 9 | indent_style = space 10 | indent_size = 2 11 | end_of_line = lf 12 | charset = utf-8 13 | trim_trailing_whitespace = true 14 | insert_final_newline = true 15 | -------------------------------------------------------------------------------- /01-rules/01-fix-this-html.html: -------------------------------------------------------------------------------- 1 | 2 | My first HTML page 3 | <body> 4 | <h1 id=heading>My first site 5 | <img src="underconstruction.gif"> 6 | <p>I'm sorry, but this page is   <b>still</b>   under construction.</b> 7 | <p>I love <ahref="https://developer.mozilla.org/en-US/docs/Web/HTML">learning html</a> 8 | </html> 9 | </body> -------------------------------------------------------------------------------- /01-rules/index.md: -------------------------------------------------------------------------------- 1 | # HTML exercise 01: Fix this HTML 2 | 3 | There are a number of rules associated with HTML elements, attributes, and HTML in general. 4 | 5 | Fix the file `01-fix-this-html.html` by making sure all the HTML inside is valid, and working according to the rules. Use the W3C Markup Validator if you want. 6 | 7 | Save, add, and then `commit` your changes in your forked repo. Make sure to `push`! -------------------------------------------------------------------------------- /01-rules/under-construction.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onja-org/html-exercises/56ba8f2ee6858bd9b172accafed7614033a41565/01-rules/under-construction.gif -------------------------------------------------------------------------------- /02-tables/02-tables.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <html lang="en"> 3 | <head> 4 | <meta charset="UTF-8"> 5 | <title>02: Tables 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | -------------------------------------------------------------------------------- /02-tables/example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onja-org/html-exercises/56ba8f2ee6858bd9b172accafed7614033a41565/02-tables/example.png -------------------------------------------------------------------------------- /02-tables/index.md: -------------------------------------------------------------------------------- 1 | # HTML exercise 02: Tables 2 | 3 | In the accompanying file `02-tables.html` you'll find a lone `
` element. 4 | 5 | Add the necessary HTML to this table, to make it look like this: 6 | 7 | ![An invoice of fruit purchases](example.png) 8 | 9 | Save, add, and then `commit` your changes in your forked repo. Make sure to `push`! -------------------------------------------------------------------------------- /03-nested-lists/03-nested-lists.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 03: Nested lists 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /03-nested-lists/index.md: -------------------------------------------------------------------------------- 1 | # HTML exercise 03: Nested lists 2 | 3 | In the accompanying file `03-nested-lists.html` you'll find an empty `` element. Let's try make an HTML nested list inside that HTML file. 4 | 5 | Make it look like the following: 6 | 7 | --- 8 | 9 | - Baboons 10 | - Chimpanzees 11 | - Gibbons 12 | - Gorillas 13 | - Lemurs 14 | 1. Aye-aye 15 | - Scary fingers 16 | - Scrawny head 17 | - Not so cute 18 | 1. Grey Mouse Lemur 19 | - Super cute 20 | - Really small 21 | 1. Ring-tailed Lemur 22 | - Monkeys 23 | 24 | --- 25 | 26 | Save, add, and then `commit` your changes in your forked repo. Make sure to `push`! -------------------------------------------------------------------------------- /03-nested-lists/lists_example.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Lists 7 | 17 | 18 | 19 |
20 |

Lists

21 |
22 | 30 |
31 |
32 |
33 |

Ordered list

34 |
35 |
    36 |
  1. Item
  2. 37 |
  3. Item
  4. 38 |
39 |
40 |
41 |
42 |

Unordered list

43 |
44 | 52 |
53 | 54 |
55 |
56 |

Unordered list inside a nav

57 |
58 | 68 |
69 | 70 |
71 |
72 |

Definition Lists

73 |
74 |
75 |
Obsolete
76 |
Out of date
77 |
Expired
78 |
Default
79 |
Automatically selected or chosen
80 |
Periphery
81 |
Something on the border
82 |
Edge of your conciousness
83 |
84 |
85 |
86 | 87 | 88 | -------------------------------------------------------------------------------- /04-sectioning-elements/04-sectioning-elements.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 04: Sectioning elements 7 | 8 | 9 | 10 | 11 |

12 | Learning 13 | HTML 14 |

15 |

16 | Sections 17 |

18 |

19 | Sectioning elements are easy to use once you know what each element does. 20 |

21 |

22 | Try to learn their purpose, that’ll make it clearer. 23 |

24 |

25 | ← 26 | Go back to the index 27 |

28 |

29 | 30 | Email me for more information 31 | 32 |

33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /04-sectioning-elements/index.md: -------------------------------------------------------------------------------- 1 | # HTML exercise 04: Sectioning elements 2 | 3 | In the accompanying file `04-sectioning-elements.html` please divide the content up into various types of elements, as illustrated in this diagram below. 4 | 5 | **Hint**: You shouldn't have to delete any of the existing HTML. Instead, wrap the contents of the document with the new elements, in the right way. 6 | 7 | ![A diagram of the various sectioning elements all working together to create a webpage](sectioning-elements.png) 8 | 9 | Save, add, and then `commit` your changes in your forked repo. Make sure to `push`! -------------------------------------------------------------------------------- /04-sectioning-elements/sectioning-elements.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onja-org/html-exercises/56ba8f2ee6858bd9b172accafed7614033a41565/04-sectioning-elements/sectioning-elements.png -------------------------------------------------------------------------------- /04-sectioning-elements/sections.css: -------------------------------------------------------------------------------- 1 | /* Set some defaults */ 2 | body { 3 | font-family: sans-serif; 4 | font-size: 100%; 5 | margin: 0; 6 | max-width: 30rem; 7 | } 8 | /* Give each sectioning element some spacing */ 9 | header, 10 | main, 11 | article, 12 | nav, 13 | footer { 14 | position: relative; 15 | padding: 0.25rem 1rem; 16 | } 17 | 18 | /* Create pseudo-elements that give each element a key */ 19 | header::before, 20 | main::before, 21 | article::before, 22 | nav::before, 23 | footer::before { 24 | position: absolute; 25 | top: .25rem; 26 | right: .25rem; 27 | font-size: .75rem; 28 | font-weight: bold; 29 | font-family: monospace; 30 | } 31 | 32 | /* Now set the colours and attribution for each */ 33 | header { 34 | background-color: rgb(206, 211, 255); 35 | } 36 | main { 37 | padding: 2rem; 38 | background-color: rgb(255, 196, 196); 39 | } 40 | article { 41 | padding: 2rem; 42 | background-color: rgb(252, 252, 167); 43 | border: 1px solid rgb(193, 173, 23); 44 | } 45 | nav { 46 | background-color: rgb(250, 207, 250); 47 | } 48 | footer { 49 | background-color: rgb(197, 255, 197); 50 | } 51 | 52 | /* And the right text for each element's pseudo-element */ 53 | header::before { 54 | content: '
'; 55 | color: rgb(78, 89, 255); 56 | } 57 | main::before { 58 | content: '
'; 59 | color: rgb(215, 80, 80); 60 | } 61 | article::before { 62 | content: '
'; 63 | color: rgb(193, 173, 23); 64 | } 65 | nav::before { 66 | content: '