Question (Combined Bank — Senior Officer (IT) — Exam: 17.05.2024 (BIBM)): Which of the following is the root tag of the HTML document?
a) <body>
b) <head>
c) <title>
d) <html>
Open the website that announces the exam you are preparing for. There is a heading at the top, a notice in two or three paragraphs, a list of important dates, a table of vacancies by department, a picture of the logo, and a link that says "Download the circular". It looks like a finished page, the way a printed notice looks finished.
Now press Ctrl+U, or right-click and choose "View page source". The same page turns into plain text: ordinary words, with small labels in angle brackets such as <h1> and </p> scattered between them. Nothing is coloured and nothing is drawn. The browser did all of that, by reading the labels and obeying them. If a piece of text is labelled as a heading, it draws a heading. If it is labelled as a list, you get a list. Those labels are HTML, and they are what this chapter is about.
Because the labels are rules, they can be asked about with great precision, and papers do exactly that. One-mark questions ask for a tag, an attribute, an old element, a version. Written questions ask you to produce markup: a page with an image and a link, a complex table, a short note on CSS and its types.
By the end you will be able to write a complete page from the first line to the last, with headings, lists, links, images and a table that uses rowspan and colspan. You will say what each tag and attribute does and which old ones to avoid, tell DOCTYPE from a tag, HTML from XHTML, and a tag from an element, add CSS and JavaScript to a page in the right way, and explain how inline, internal and external CSS differ.