Match the following with respect to HTML tags and usage. Item HTML tag Match…
2012
Match the following with respect to HTML tags and usage.
Item | HTML tag | Match | Usage |
|---|---|---|---|
a. | CITE | 1. | Italic representation |
b. | EM | 2. | Represents output from programmes |
c. | VAR | 3. | Represents to other source |
d. | SAMP | 4. | Argument to a programme |
Answer: A. a b c d 3 1 4 2 — Concept HTML phrase elements label what a piece of text IS, not how it should look: each one names a semantic role, and any italic or monospace styling a…
- A.
a
b
c
d
3
1
4
2
- B.
a
b
c
d
2
3
1
4
- C.
a
b
c
d
4
2
3
1
- D.
a
b
c
d
1
3
4
1
Attempted by 31 students.
Show answer & explanation
Correct answer: A
Concept
HTML phrase elements label what a piece of text IS, not how it should look: each one names a semantic role, and any italic or monospace styling a browser applies is only a default consequence of that role. Four such roles are distinguished here — attributing text to an external work, marking emphatic stress, naming a variable or argument inside a program, and showing sample output produced by a program.
Application
Take each tag by its defined role and read off the usage it matches:
HTML tag | What the tag marks | Matching usage |
|---|---|---|
CITE | A citation — the title of, or a reference to, another work | 3. Represents to other source |
EM | Emphatic stress; the default browser rendering is italic | 1. Italic representation |
VAR | A variable or an argument of a program | 4. Argument to a programme |
SAMP | Sample output produced by a program | 2. Represents output from programmes |
Cross-check
The two pairs that are easiest to swap settle the mapping:
CITE and EM are both italic in a browser's default stylesheet, so appearance alone cannot separate them; only CITE carries the meaning "reference to another source", which fixes a-3 and leaves "Italic representation" for EM.
VAR and SAMP sit on opposite sides of a program run: VAR names something going in (a variable or argument), while SAMP shows what comes out (printed output), which fixes c-4 and d-2.
Hence the complete matching is a-3, b-1, c-4, d-2.