HTML Interview10 Q&A

HTML Text Content Interview: 10 Essential Q&A

Most asked questions on headings, paragraphs, inline text meaning, and readable text structure.

1How should heading tags be used?easy
Answer: Use one primary h1 and maintain logical order (h2, h3...) without skipping levels arbitrarily.
2When to use <p>?easy
Answer: Use p for standalone paragraphs of text, not for spacing layout.
3<strong> vs <b>?medium
Answer: strong adds semantic importance; b is stylistic bold without extra meaning.
4<em> vs <i>?medium
Answer: em indicates emphasis in meaning; i is presentational/alternate voice text.
5<br> and <hr> use cases?easy
Answer: Use br for line breaks in text contexts; hr for thematic breaks between sections.
6When should you use <blockquote>?easy
Answer: For extended quotations from external sources.
7<pre> and <code> purpose?medium
Answer: pre preserves whitespace; code marks code fragments for semantic clarity.
8Name useful semantic text tags.easy
Answer: abbr, mark, cite, time, small, sub, and sup.
9How to improve text readability?medium
Answer: Use clear hierarchy, short paragraphs, proper contrast, and meaningful headings.
10Top interview best practice for text content?medium
Answer: Prefer semantic meaning first, then style with CSS.
Text Content Cheat Sheet
  • Semantic emphasis: strong, em
  • Structure content with heading hierarchy
  • Readable text beats decorative markup
Tricky Q&A (10 Questions)
11strong vs b:tricky
Answer: Correct answer: strong indicates importance; b is stylistic without extra semantics. strong carries semantic importance.
12em vs i:tricky
Answer: Correct answer: em emphasizes; i is stylistic italic without emphasis. em marks emphasized stress; i is presentational italic.
13blockquote cite attribute:tricky
Answer: Correct answer: URL reference for quote source. cite holds source URL for the quotation.
14code element is for:tricky
Answer: Correct answer: Short inline code fragments. code marks inline code snippets.
15pre element preserves:tricky
Answer: Correct answer: Whitespace and line breaks. pre shows preformatted text literally.
16sub and sup are used for:tricky
Answer: Correct answer: Subscript and superscript. sub/sup format subscript/superscript.
17mark element indicates:tricky
Answer: Correct answer: Highlighted/relevant text. mark highlights text for reference.
18br vs new p for poetry lines:tricky
Answer: Correct answer: br may be acceptable for line breaks within stanza. br can break lines within a semantic block.
19h1 best practice per page:tricky
Answer: Correct answer: One primary h1 reflecting page topic. Single clear h1 aids outline and SEO.
20small element typically represents:tricky
Answer: Correct answer: Side comments/fine print. small is for ancillary text like disclaimers.