A file for a science fair page was cut off after line 9, shown below. In the body, ul makes a bulleted list, li is one list item, em marks emphasized text and strong marks important text. The page needs no further content. Close every open element with its own end tag, and arrange the end tags in the order they must be added to finish the file correctly.
Line
Code
1
⟨!DOCTYPE html⟩\langle\texttt{!DOCTYPE html}\rangle⟨!DOCTYPE html⟩
2
⟨html lang="en"⟩\langle\texttt{html lang="en"}\rangle⟨html lang="en"⟩
3
⟨head⟩\quad\langle\texttt{head}\rangle⟨head⟩
4
⟨title⟩Science Fair⟨/title⟩\quad\quad\langle\texttt{title}\rangle\texttt{Science Fair}\langle\texttt{/title}\rangle⟨title⟩Science Fair⟨/title⟩
5
⟨/head⟩\quad\langle\texttt{/head}\rangle⟨/head⟩
6
⟨body⟩\quad\langle\texttt{body}\rangle⟨body⟩
7
⟨h1⟩Science Fair⟨/h1⟩\quad\quad\langle\texttt{h1}\rangle\texttt{Science Fair}\langle\texttt{/h1}\rangle⟨h1⟩Science Fair⟨/h1⟩
8
⟨ul⟩\quad\quad\langle\texttt{ul}\rangle⟨ul⟩
9
⟨li⟩Judging starts at ⟨em⟩⟨strong⟩10 a.m.\quad\quad\quad\langle\texttt{li}\rangle\texttt{Judging starts at }\langle\texttt{em}\rangle\langle\texttt{strong}\rangle\texttt{10 a.m.}⟨li⟩Judging starts at ⟨em⟩⟨strong⟩10 a.m.
1.
⟨/li⟩\langle\texttt{/li}\rangle⟨/li⟩
2.
⟨/em⟩\langle\texttt{/em}\rangle⟨/em⟩
3.
⟨/html⟩\langle\texttt{/html}\rangle⟨/html⟩
4.
⟨/body⟩\langle\texttt{/body}\rangle⟨/body⟩
5.
⟨/strong⟩\langle\texttt{/strong}\rangle⟨/strong⟩
6.
⟨/ul⟩\langle\texttt{/ul}\rangle⟨/ul⟩
Unlock full course notes by signing up
Parents and nesting levels in a club page
In the HTML document below, ol creates a numbered list, li is one list item and em marks emphasised text. The author did not indent the code. Treat html as nesting level 1, so each child is one level deeper than its parent.
For each element in the table, type the name of its parent element and its nesting level as a whole number.
Counting elements and end tags in a weather log
A student writes the weather log page below. In the body, strong and em mark important and emphasised words. Treat html as nesting level 1.
Give each answer as a whole number: the total number of elements in the document, the number of end tags written in the file, and the deepest nesting level reached by any element.
Head or body for a sports team page
A student is building a page for the school's volleyball team. For each element in the table, type head or body to show where it belongs in the document, and type yes or no to show whether its content appears in the page area of the browser window (the tab does not count as the page area).