Scenario-Based Questions & Answers

  1. How would you create a responsive layout in HTML?

    • Use <meta name="viewport"> and CSS media queries. HTML5 semantic elements help structure.
  2. How can you improve accessibility in an HTML document?

    • Use semantic tags, alt text, ARIA attributes, proper heading structure, and labels for inputs.
  3. How would you create a table with merged rows and columns?

    • Use rowspan and colspan attributes in <td> or <th>.
  4. How do you include an external CSS or JavaScript file in HTML?

    • CSS: <link rel="stylesheet" href="style.css"> JS: <script src="script.js"></script>
  5. How do you optimize an HTML page for SEO?

    • Use semantic tags, meaningful URLs, <title>, meta descriptions, proper heading levels, and alt attributes for images.
0
Subscribe to my newsletter

Read articles from Banashree Aribenchi directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Banashree Aribenchi
Banashree Aribenchi