{"id":48616,"date":"2026-04-08T19:45:05","date_gmt":"2026-04-08T14:15:05","guid":{"rendered":"https:\/\/www.foundit.sg\/career-advice\/?p=48616"},"modified":"2026-04-09T11:41:28","modified_gmt":"2026-04-09T06:11:28","slug":"html-interview-questions-answers","status":"publish","type":"post","link":"https:\/\/www.foundit.sg\/career-advice\/html-interview-questions-answers\/","title":{"rendered":"Top HTML Interview Questions and Answers [2026]"},"content":{"rendered":"\n<p>  <p>HTML remains one of the most frequently tested skills in frontend and UI developer interviews across Singapore. Companies like DBS, Grab, Singtel, and Shopee often begin technical rounds with HTML interview questions to evaluate a candidate\u2019s fundamentals before moving on to CSS, JavaScript, or frameworks.<\/p>\r\n\r\n<p>This list of <strong>Top 50 HTML Interview Questions and Answers [2025]<\/strong> will help you prepare for roles ranging from junior web developer to experienced UI engineer. Each question is explained in simple language with examples so you can demonstrate both theoretical knowledge and practical coding ability during interviews.<\/p>\r\n    <\/p>\n\n\n\n<div class=\"wp-block-group has-background\" style=\"background-color:#ABB7C245;padding:5px 10px;border-radius:8px;\">\n  <details open>\n    <summary><strong>\ud83d\udd3d Table of Contents<\/strong><\/summary>\n    <ol>\n      <li><strong><a href=\"#html-basic\">Basic HTML Interview Questions<\/a><\/strong><\/li>\n      <li><strong><a href=\"#html-advanced\">Advanced HTML Interview Questions<\/a><\/strong><\/li>\n      <li><strong><a href=\"#html-scenario\">Scenario-Based HTML Interview Questions<\/a><\/strong><\/li>\n      <li><strong><a href=\"#html5-specific\">HTML5-Specific Interview Questions<\/a><\/strong><\/li>\n      <li><strong><a href=\"#checklist\">Checklist: Quick Prep for HTML Interviews<\/a><\/strong><\/li>\n      <li><strong><a href=\"#comparison\">Comparison Table: HTML vs HTML5<\/a><\/strong><\/li>\n      <li><strong><a href=\"#faqs\">FAQs on HTML Interviews<\/a><\/strong><\/li>\n    <\/ol>\n  <\/details>\n<\/div>\n\n\n\n<div style=\"height: 15px;\"><\/div>\n<div style=\"text-align: center;\">\n<a style=\"display: inline-block;background-color: #7900c6;color: #fff;text-align: center;padding: 10px 20px;text-decoration: none;font-size: 18px;border-radius: 4px;font-weight: bold;\" href=\"https:\/\/www.foundit.sg\/search\/html-jobs\" target=\"_blank\">Apply for HTML Jobs<\/a>\n<\/div> \n<div style=\"height: 15px;\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Basic HTML Interview Questions<\/h2>\n\n\n\n<h3><strong>Q1. What is HTML?<\/strong><\/h3>\n<div style=\"background-color:#c4c6c845; padding:8px; border-radius:4px;\">\n<p style=\"margin:0;\">HTML (HyperText Markup Language) is the standard language for creating web pages. It structures content using elements and tags such as headings, paragraphs, links, and images. Browsers interpret HTML to render a page visually.<\/p>\n<\/div>\n\n<h3><strong>Q2. What are HTML tags?<\/strong><\/h3>\n<div style=\"background-color:#c4c6c845; padding:8px; border-radius:4px;\">\n<p style=\"margin:0;\">Tags are the basic building blocks of HTML. They define how content should appear on a webpage.<\/p>\n<p style=\"margin:0;\"><strong>Example:<\/strong><br>\n<code>&lt;p&gt;This is a paragraph&lt;\/p&gt;<\/code><\/p>\n<\/div>\n\n<h3><strong>Q3. Difference between HTML and HTML5?<\/strong><\/h3>\n<div style=\"background-color:#c4c6c845; padding:8px; border-radius:4px;\">\n<p style=\"margin:0;\"><strong>HTML5<\/strong> is the modern version that adds new semantic tags, multimedia support, and APIs for advanced features. It improves performance, SEO, and accessibility compared to older HTML versions.<\/p>\n<p style=\"margin:0;\"><strong>Example:<\/strong><br>\nHTML5 introduced <code>&lt;audio&gt;<\/code>, <code>&lt;video&gt;<\/code>, <code>&lt;canvas&gt;<\/code>, and semantic tags like <code>&lt;section&gt;<\/code>, <code>&lt;article&gt;<\/code>.<\/p>\n<\/div>\n\n<h3><strong>Q4. What are semantic elements in HTML?<\/strong><\/h3>\n<div style=\"background-color:#c4c6c845; padding:8px; border-radius:4px;\">\n<p style=\"margin:0;\">Semantic elements describe meaning rather than just presentation, making content easier for search engines and assistive technologies to interpret.<\/p>\n<p style=\"margin:0;\"><strong>Example:<\/strong><br>\n<code>&lt;header&gt;<\/code>, <code>&lt;footer&gt;<\/code>, <code>&lt;nav&gt;<\/code>, <code>&lt;article&gt;<\/code>, <code>&lt;aside&gt;<\/code>.<\/p>\n<\/div>\n\n<h3><strong>Q5. Explain the difference between inline and block elements.<\/strong><\/h3>\n<div style=\"background-color:#c4c6c845; padding:8px; border-radius:4px;\">\n<p style=\"margin:0;\"><strong>Block elements<\/strong> start on a new line and take full width. <strong>Inline elements<\/strong> stay within a line and only occupy as much width as needed.<\/p>\n<p style=\"margin:0;\"><strong>Example:<\/strong><br>\nBlock: <code>&lt;div&gt;<\/code>, <code>&lt;p&gt;<\/code><br>\nInline: <code>&lt;span&gt;<\/code>, <code>&lt;a&gt;<\/code>, <code>&lt;strong&gt;<\/code><\/p>\n<\/div>\n\n<h3><strong>Q6. What are HTML attributes?<\/strong><\/h3>\n<div style=\"background-color:#c4c6c845; padding:8px; border-radius:4px;\">\n<p style=\"margin:0;\">Attributes provide extra information about an element, such as source, size, or accessibility labels.<\/p>\n<p style=\"margin:0;\"><strong>Example:<\/strong><br>\n<code>&lt;img src=\"image.jpg\" alt=\"profile picture\"&gt;<\/code><br>\nHere <code>src<\/code> specifies the image file, and <code>alt<\/code> provides alternative text.<\/p>\n<\/div>\n\n<h3><strong>Q7. What is the difference between the id and class attributes in HTML?<\/strong><\/h3>\n<div style=\"background-color:#c4c6c845; padding:8px; border-radius:4px;\">\n<p style=\"margin:0;\"><strong>id<\/strong> is used to uniquely identify one element on a page. <strong>class<\/strong> is used to group multiple elements so they can share the same styling or behaviour. In interviews, a common point to mention is that JavaScript and CSS often target both, but an <code>id<\/code> should not be repeated on the same page.<\/p>\n<p style=\"margin:0;\"><strong>Example:<\/strong><br>\n<code>&lt;div id=\"main-header\"&gt;&lt;\/div&gt;<\/code><br>\n<code>&lt;div class=\"card\"&gt;&lt;\/div&gt;<\/code><\/p>\n<\/div>\n\n<h3><strong>Q8. What is the use of &lt;meta&gt; tags?<\/strong><\/h3>\n<div style=\"background-color:#c4c6c845; padding:8px; border-radius:4px;\">\n<p style=\"margin:0;\">Meta tags provide metadata about a webpage such as description, keywords, charset, and viewport settings for responsive design.<\/p>\n<p style=\"margin:0;\"><strong>Example:<\/strong><br>\n<code>&lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"&gt;<\/code><\/p>\n<\/div>\n\n<h3><strong>Q9. Difference between relative and absolute URLs?<\/strong><\/h3>\n<div style=\"background-color:#c4c6c845; padding:8px; border-radius:4px;\">\n<p style=\"margin:0;\"><strong>Relative URL<\/strong>: Path relative to the current page. <br>\n<strong>Absolute URL<\/strong>: Full path including protocol and domain.<\/p>\n<p style=\"margin:0;\"><strong>Example:<\/strong><br>\nRelative: <code>about.html<\/code><br>\nAbsolute: <code>https:\/\/example.com\/about.html<\/code><\/p>\n<\/div>\n\n<h3><strong>Q10. What is the difference between &lt;ol&gt; and &lt;ul&gt;?<\/strong><\/h3>\n<div style=\"background-color:#c4c6c845; padding:8px; border-radius:4px;\">\n<p style=\"margin:0;\"><code>&lt;ol&gt;<\/code> creates an ordered list with numbers, while <code>&lt;ul&gt;<\/code> creates an unordered list with bullets.<\/p>\n<p style=\"margin:0;\"><strong>Example:<\/strong><br>\n<code>&lt;ol&gt;&lt;li&gt;One&lt;\/li&gt;&lt;\/ol&gt;<\/code><br>\n<code>&lt;ul&gt;&lt;li&gt;One&lt;\/li&gt;&lt;\/ul&gt;<\/code><\/p>\n<\/div>\n\n<h3><strong>Q11. What is the difference between HTML and XHTML?<\/strong><\/h3>\n<div style=\"background-color:#c4c6c845; padding:8px; border-radius:4px;\">\n<p style=\"margin:0;\"><strong>XHTML<\/strong> is stricter than HTML. It requires all tags to be closed, attributes quoted, and lowercase element names.<\/p>\n<p style=\"margin:0;\"><strong>Example:<\/strong><br>\nHTML: <code>&lt;br&gt;<\/code><br>\nXHTML: <code>&lt;br \/&gt;<\/code><\/p>\n<\/div>\n\n<h3><strong>Q12. What are empty elements in HTML?<\/strong><\/h3>\n<div style=\"background-color:#c4c6c845; padding:8px; border-radius:4px;\">\n<p style=\"margin:0;\">Empty elements have no closing tag or content.<\/p>\n<p style=\"margin:0;\"><strong>Example:<\/strong><br>\n<code>&lt;br&gt;<\/code>, <code>&lt;hr&gt;<\/code>, <code>&lt;img&gt;<\/code>, <code>&lt;input&gt;<\/code><\/p>\n<\/div>\n\n<h3><strong>Q13. Difference between HTML tags &lt;strong&gt; and &lt;b&gt;?<\/strong><\/h3>\n<div style=\"background-color:#c4c6c845; padding:8px; border-radius:4px;\">\n<p style=\"margin:0;\"><code>&lt;strong&gt;<\/code> gives semantic importance (read by screen readers, improves SEO), while <code>&lt;b&gt;<\/code> only makes text bold without meaning.<\/p>\n<p style=\"margin:0;\"><strong>Example:<\/strong><br>\n<code>&lt;strong&gt;Warning&lt;\/strong&gt;<\/code> vs <code>&lt;b&gt;Warning&lt;\/b&gt;<\/code><\/p>\n<\/div>\n\n<h3><strong>Q14. What is the difference between inline CSS and external CSS in HTML?<\/strong><\/h3>\n<div style=\"background-color:#c4c6c845; padding:8px; border-radius:4px;\">\n<p style=\"margin:0;\"><strong>Inline CSS<\/strong> is written inside the HTML element\u2019s <code>style<\/code> attribute. <strong>External CSS<\/strong> is linked via <code>&lt;link&gt;<\/code> and applies across multiple pages. External CSS is preferred for maintainability.<\/p>\n<p style=\"margin:0;\"><strong>Example:<\/strong><br>\nInline: <code>&lt;p style=\"color:red;\"&gt;Hello&lt;\/p&gt;<\/code><br>\nExternal: <code>&lt;link rel=\"stylesheet\" href=\"style.css\"&gt;<\/code><\/p>\n<\/div>\n\n<h3><strong>Q15. What is the difference between GET and POST methods in HTML forms?<\/strong><\/h3>\n<div style=\"background-color:#c4c6c845; padding:8px; border-radius:4px;\">\n<p style=\"margin:0;\"><strong>GET<\/strong>: Sends data via URL, less secure, suitable for search queries. <br>\n<strong>POST<\/strong>: Sends data in the request body, more secure, used for sensitive data like login or payments.<\/p>\n<p style=\"margin:0;\"><strong>Example:<\/strong><br>\n<code>&lt;form method=\"GET\"&gt;<\/code> vs <code>&lt;form method=\"POST\"&gt;<\/code><\/p>\n<\/div>\n\n\n\n<div style=\"height: 15px;\"><\/div>\n\n\n\n<p class=\"has-background\" style=\"background-color:#ffdeed\"><strong>Read Also: <a href=\"https:\/\/www.foundit.sg\/career-advice\/web-developer-interview-questions-and-answers\/\" target=\"_blank\" rel=\"noreferrer noopener\">Web Developer Interview Questions and Answers<\/a><\/strong><\/p>\n\n\n\n<h2 id=\"html-advanced\">Advanced HTML Interview Questions<\/h2>\n\n<h3><strong>Q16. What are HTML5 APIs?<\/strong><\/h3>\n<div style=\"background-color:#c4c6c845; padding:8px; border-radius:4px;\">\n<p style=\"margin:0;\">HTML5 introduced several APIs that extend the capabilities of the browser without relying on third-party plugins. These APIs allow developers to create richer, more interactive applications directly in the browser. Common APIs include Geolocation API, Web Storage API, Canvas API, Drag-and-Drop API, and Web Workers.<\/p>\n<p style=\"margin:0;\"><strong>Example:<\/strong><br>\nThe Geolocation API can fetch a user\u2019s location:<br>\n<code>navigator.geolocation.getCurrentPosition(function(pos)  );<\/code><\/p>\n<\/div>\n\n<h3><strong>Q17. What is the difference between localStorage and sessionStorage in HTML5?<\/strong><\/h3>\n<div style=\"background-color:#c4c6c845; padding:8px; border-radius:4px;\">\n<p style=\"margin:0;\">Both localStorage and sessionStorage are part of the Web Storage API used for storing data on the client side. The key difference lies in persistence: <strong>localStorage<\/strong> persists data even after the browser is closed, while <strong>sessionStorage<\/strong> stores data only for the current session and clears when the browser tab is closed.<\/p>\n<p style=\"margin:0;\"><strong>Example:<\/strong><br>\n<code>localStorage.setItem(\"user\",\"John\");<\/code><br>\n<code>sessionStorage.setItem(\"token\",\"12345\");<\/code><\/p>\n<\/div>\n\n<h3><strong>Q18. How does HTML5 improve form handling compared to older HTML?<\/strong><\/h3>\n<div style=\"background-color:#c4c6c845; padding:8px; border-radius:4px;\">\n<p style=\"margin:0;\">HTML5 added new input types and attributes that enhance form validation and user experience without JavaScript. Attributes like <code>required<\/code>, <code>placeholder<\/code>, <code>pattern<\/code>, and input types like <code>email<\/code>, <code>url<\/code>, <code>number<\/code>, and <code>date<\/code> help in building robust forms with built-in validation and accessibility.<\/p>\n<p style=\"margin:0;\"><strong>Example:<\/strong><br>\n<code>&lt;input type=\"email\" required placeholder=\"Enter your email\"&gt;<\/code><br>\nThis ensures the input is a valid email before form submission.<\/p>\n<\/div>\n\n<h3><strong>Q19. What is the difference between SVG and Canvas in HTML5?<\/strong><\/h3>\n<div style=\"background-color:#c4c6c845; padding:8px; border-radius:4px;\">\n<p style=\"margin:0;\"><strong>SVG (Scalable Vector Graphics)<\/strong> uses XML to describe 2D graphics, which remain sharp when scaled. <strong>Canvas<\/strong> provides a raster-based drawing surface that requires JavaScript for drawing. SVG is best for static images like charts or icons, while Canvas is suited for dynamic, pixel-based rendering like games or animations.<\/p>\n<p style=\"margin:0;\"><strong>Example:<\/strong><br>\nSVG: <code>&lt;svg&gt;&lt;circle cx=\"50\" cy=\"50\" r=\"40\" fill=\"red\"\/&gt;&lt;\/svg&gt;<\/code><br>\nCanvas: <code>ctx.fillRect(20,20,150,100);<\/code><\/p>\n<\/div>\n\n<h3><strong>Q20. How does HTML5 handle multimedia without plugins?<\/strong><\/h3>\n<div style=\"background-color:#c4c6c845; padding:8px; border-radius:4px;\">\n<p style=\"margin:0;\">Previously, Flash or Silverlight were used for embedding audio and video. HTML5 introduced the <code>&lt;audio&gt;<\/code> and <code>&lt;video&gt;<\/code> tags, making it possible to embed media natively in the browser with attributes for controls, autoplay, loop, and preload.<\/p>\n<p style=\"margin:0;\"><strong>Example:<\/strong><br>\n<code>&lt;video src=\"movie.mp4\" controls width=\"400\"&gt;&lt;\/video&gt;<\/code><\/p>\n<\/div>\n\n<h3><strong>Q21. What are ARIA roles in HTML, and why are they important?<\/strong><\/h3>\n<div style=\"background-color:#c4c6c845; padding:8px; border-radius:4px;\">\n<p style=\"margin:0;\">ARIA (Accessible Rich Internet Applications) roles make web content more accessible for users relying on screen readers or assistive technologies. They describe the role of elements beyond native semantics, ensuring better accessibility and compliance with standards like WCAG.<\/p>\n<p style=\"margin:0;\"><strong>Example:<\/strong><br>\n<code>&lt;button role=\"switch\" aria-checked=\"true\"&gt;Toggle&lt;\/button&gt;<\/code><\/p>\n<\/div>\n\n<h3><strong>Q22. Explain the difference between defer and async attributes in the &lt;script&gt; tag.<\/strong><\/h3>\n<div style=\"background-color:#c4c6c845; padding:8px; border-radius:4px;\">\n<p style=\"margin:0;\"><strong>Async<\/strong>: Loads the script asynchronously and executes it immediately once loaded, potentially before HTML parsing is complete.<br>\n<strong>Defer<\/strong>: Loads the script while parsing HTML but executes only after the document is fully parsed. <br>\nDefer is usually preferred for predictable execution order.<\/p>\n<p style=\"margin:0;\"><strong>Example:<\/strong><br>\n<code>&lt;script src=\"app.js\" async&gt;&lt;\/script&gt;<\/code><br>\n<code>&lt;script src=\"app.js\" defer&gt;&lt;\/script&gt;<\/code><\/p>\n<\/div>\n\n<h3><strong>Q23. What is the purpose of the &lt;!DOCTYPE html&gt; declaration?<\/strong><\/h3>\n<div style=\"background-color:#c4c6c845; padding:8px; border-radius:4px;\">\n<p style=\"margin:0;\"><code>&lt;!DOCTYPE html&gt;<\/code> tells the browser that the document uses HTML5. It helps the browser render the page in standards mode instead of quirks mode. This is a common interview question because it checks whether you understand the basic structure of a valid HTML document.<\/p>\n<p style=\"margin:0;\"><strong>Example:<\/strong><br>\n<code>&lt;!DOCTYPE html&gt;<\/code><br>\n<code>&lt;html lang=\"en\"&gt;...&lt;\/html&gt;<\/code><\/p>\n<\/div>\n\n<h3><strong>Q24. What is the difference between cookies, localStorage, and sessionStorage?<\/strong><\/h3>\n<div style=\"background-color:#c4c6c845; padding:8px; border-radius:4px;\">\n<p style=\"margin:0;\">All three store data on the client-side but differ in size, persistence, and purpose. <strong>Cookies<\/strong> are small and often used for server communication, limited to ~4KB. <strong>localStorage<\/strong> allows ~5\u201310MB of persistent storage. <strong>sessionStorage<\/strong> is similar to localStorage but clears when the browser tab closes.<\/p>\n<p style=\"margin:0;\"><strong>Example:<\/strong><br>\n<code>document.cookie=\"user=John\";<\/code><br>\n<code>localStorage.setItem(\"theme\",\"dark\");<\/code><\/p>\n<\/div>\n\n<h3><strong>Q25. How do you optimize HTML for SEO?<\/strong><\/h3>\n<div style=\"background-color:#c4c6c845; padding:8px; border-radius:4px;\">\n<p style=\"margin:0;\">Optimising HTML for SEO involves proper use of semantic elements, title and meta descriptions, header tags in hierarchy, alt attributes for images, clean URLs, and structured data. This ensures better crawling and ranking by search engines.<\/p>\n<p style=\"margin:0;\"><strong>Example:<\/strong><br>\n<code>&lt;h1&gt;Best HTML Interview Questions&lt;\/h1&gt;<\/code><br>\n<code>&lt;img src=\"html.png\" alt=\"HTML tutorial\"&gt;<\/code><\/p>\n<\/div>\n\n<h3><strong>Q26. What are custom data attributes in HTML5?<\/strong><\/h3>\n<div style=\"background-color:#c4c6c845; padding:8px; border-radius:4px;\">\n<p style=\"margin:0;\">Custom data attributes allow developers to store extra information directly in HTML elements without cluttering the DOM. They are defined as <code>data-*<\/code> attributes and can be accessed via JavaScript for dynamic functionality.<\/p>\n<p style=\"margin:0;\"><strong>Example:<\/strong><br>\n<code>&lt;div data-user=\"123\" data-role=\"admin\"&gt;John&lt;\/div&gt;<\/code><br>\n<code>element.dataset.user<\/code> \u2192 &#8220;123&#8221;<\/p>\n<\/div>\n\n<h3><strong>Q27. What are web components in HTML5?<\/strong><\/h3>\n<div style=\"background-color:#c4c6c845; padding:8px; border-radius:4px;\">\n<p style=\"margin:0;\">Web Components are reusable custom elements with encapsulated functionality. They use Shadow DOM, Custom Elements, and HTML Templates to build modular, maintainable web apps without external frameworks.<\/p>\n<p style=\"margin:0;\"><strong>Example:<\/strong><br>\n<code>class MyButton extends HTMLElement   } customElements.define(\"my-btn\", MyButton);<\/code><\/p>\n<\/div>\n\n<h3><strong>Q28. Explain progressive rendering in HTML.<\/strong><\/h3>\n<div style=\"background-color:#c4c6c845; padding:8px; border-radius:4px;\">\n<p style=\"margin:0;\">Progressive rendering refers to techniques that improve perceived load speed by displaying content as it becomes available. This includes lazy loading images, using <code>&lt;link rel=\"preload\"&gt;<\/code>, and rendering above-the-fold content early.<\/p>\n<p style=\"margin:0;\"><strong>Example:<\/strong><br>\n<code>&lt;img src=\"large.jpg\" loading=\"lazy\"&gt;<\/code><\/p>\n<\/div>\n\n<h3><strong>Q29. What is the difference between inline frames (iframes) and object\/embed tags?<\/strong><\/h3>\n<div style=\"background-color:#c4c6c845; padding:8px; border-radius:4px;\">\n<p style=\"margin:0;\"><strong>Iframes<\/strong> embed another HTML document within the page. <strong>Object\/Embed<\/strong> tags are used for embedding external resources like PDFs, Flash (legacy), or media. Iframes are most commonly used today.<\/p>\n<p style=\"margin:0;\"><strong>Example:<\/strong><br>\n<code>&lt;iframe src=\"page.html\"&gt;&lt;\/iframe&gt;<\/code><\/p>\n<\/div>\n\n<h3><strong>Q30. How do you ensure cross-browser compatibility in HTML?<\/strong><\/h3>\n<div style=\"background-color:#c4c6c845; padding:8px; border-radius:4px;\">\n<p style=\"margin:0;\">Cross-browser compatibility ensures a website functions consistently across Chrome, Firefox, Safari, and Edge. Developers achieve this by using semantic HTML, testing with modern tools, adding polyfills for unsupported features, and avoiding deprecated tags.<\/p>\n<p style=\"margin:0;\"><strong>Example:<\/strong><br>\nUsing CSS resets and testing HTML5 features with <code>Modernizr<\/code> helps detect and patch missing browser capabilities.<\/p>\n<\/div>\n\n\n\n<div style=\"height: 15px;\"><\/div>\n\n\n\n<p class=\"has-background\" style=\"background-color:#ffdeed\"><strong>Read Also: <a href=\"https:\/\/www.foundit.sg\/career-advice\/top-30-php-oops-interview-questions-and-answers\/\" target=\"_blank\" rel=\"noreferrer noopener\">PHP OOPS Interview Questions and Sample Answers<\/a><\/strong><\/p>\n\n\n\n<h2 id=\"html-scenario\">Scenario-Based HTML Interview Questions<\/h2>\n\n<h3><strong>Q31. What is the purpose of the &lt;noscript&gt; tag in HTML?<\/strong><\/h3>\n<div style=\"background-color:#c4c6c845; padding:8px; border-radius:4px;\">\n<p style=\"margin:0;\">The <code>&lt;noscript&gt;<\/code> tag provides fallback content for users whose browsers do not support JavaScript or have it disabled. It is useful for accessibility, graceful degradation, and sometimes for ensuring critical information is still visible.<\/p>\n<p style=\"margin:0;\"><strong>Example:<\/strong><br>\n<code>&lt;noscript&gt;Please enable JavaScript to use this feature.&lt;\/noscript&gt;<\/code><\/p>\n<\/div>\n\n<h3><strong>Q32. What is the difference between the &lt;picture&gt; tag and the &lt;img&gt; tag?<\/strong><\/h3>\n<div style=\"background-color:#c4c6c845; padding:8px; border-radius:4px;\">\n<p style=\"margin:0;\"><code>&lt;img&gt;<\/code> displays a single image resource, while <code>&lt;picture&gt;<\/code> lets you define multiple image sources for different screen sizes or formats. This is useful for responsive design and performance optimisation.<\/p>\n<p style=\"margin:0;\"><strong>Example:<\/strong><br>\n<code>&lt;picture&gt;<br>&lt;source srcset=\"image.webp\" type=\"image\/webp\"&gt;<br>&lt;img src=\"image.jpg\" alt=\"Sample\"&gt;<br>&lt;\/picture&gt;<\/code><\/p>\n<\/div>\n\n<h3><strong>Q33. How would you implement accessibility in an HTML form?<\/strong><\/h3>\n<div style=\"background-color:#c4c6c845; padding:8px; border-radius:4px;\">\n<p style=\"margin:0;\">Accessibility in forms is achieved by associating labels with inputs, using ARIA attributes where needed, and ensuring error messages are descriptive. Always use the <code>&lt;label&gt;<\/code> tag, proper <code>alt<\/code> text, and keyboard navigation support.<\/p>\n<p style=\"margin:0;\"><strong>Example:<\/strong><br>\n<code>&lt;label for=\"email\"&gt;Email Address&lt;\/label&gt; &lt;input id=\"email\" type=\"email\" required aria-required=\"true\"&gt;<\/code><\/p>\n<\/div>\n\n<h3><strong>Q34. You notice duplicate HTML IDs in a large project. How would you handle it?<\/strong><\/h3>\n<div style=\"background-color:#c4c6c845; padding:8px; border-radius:4px;\">\n<p style=\"margin:0;\">IDs must be unique per page. Duplicates cause issues with CSS targeting, JavaScript DOM manipulation, and accessibility. To resolve this, replace duplicate IDs with classes if multiple elements share styles, or dynamically assign unique IDs where scripting is required.<\/p>\n<p style=\"margin:0;\"><strong>Example:<\/strong><br>\nInstead of multiple <code>&lt;div id=\"box\"&gt;<\/code>, use <code>&lt;div class=\"box\"&gt;<\/code>.<\/p>\n<\/div>\n\n<h3><strong>Q35. How do you handle SEO if a website is built mostly with JavaScript rendering?<\/strong><\/h3>\n<div style=\"background-color:#c4c6c845; padding:8px; border-radius:4px;\">\n<p style=\"margin:0;\">For SEO, search engines should access meaningful HTML content. With heavy JavaScript frameworks, always provide server-side rendering (SSR) or static HTML fallbacks. Include semantic HTML tags, meta descriptions, and structured data for crawlers.<\/p>\n<p style=\"margin:0;\"><strong>Example:<\/strong><br>\nImplement <code>&lt;noscript&gt;<\/code> fallback or use Next.js\/Nuxt.js for server-rendered HTML output.<\/p>\n<\/div>\n\n<h3><strong>Q36. How would you improve page load performance for a form-heavy page?<\/strong><\/h3>\n<div style=\"background-color:#c4c6c845; padding:8px; border-radius:4px;\">\n<p style=\"margin:0;\">Optimise form-heavy pages by reducing unnecessary fields, using client-side validation, deferring non-critical scripts, and compressing assets. Group related fields using <code>&lt;fieldset&gt;<\/code> and ensure proper use of semantic elements for clarity and performance.<\/p>\n<p style=\"margin:0;\"><strong>Example:<\/strong><br>\n<code>&lt;fieldset&gt;&lt;legend&gt;Contact Details&lt;\/legend&gt; ... &lt;\/fieldset&gt;<\/code><\/p>\n<\/div>\n\n<h3><strong>Q37. A client asks for embedded YouTube videos without slowing down the page. What would you do?<\/strong><\/h3>\n<div style=\"background-color:#c4c6c845; padding:8px; border-radius:4px;\">\n<p style=\"margin:0;\">Embedding multiple YouTube iframes can hurt performance. Instead, use a lazy-load technique where only a thumbnail loads initially, and the actual iframe loads on user interaction.<\/p>\n<p style=\"margin:0;\"><strong>Example:<\/strong><br>\nLoad a preview image (<code>img<\/code>) and replace it with the iframe when clicked using JavaScript.<\/p>\n<\/div>\n\n<h3><strong>Q38. How would you fix layout shifts caused by ads or images in HTML pages?<\/strong><\/h3>\n<div style=\"background-color:#c4c6c845; padding:8px; border-radius:4px;\">\n<p style=\"margin:0;\">Cumulative Layout Shift (CLS) is a Core Web Vital metric. Prevent layout shifts by defining explicit width and height for images and ad slots. This reserves space before assets load.<\/p>\n<p style=\"margin:0;\"><strong>Example:<\/strong><br>\n<code>&lt;img src=\"banner.jpg\" width=\"728\" height=\"90\" alt=\"Ad\"&gt;<\/code><\/p>\n<\/div>\n\n<h3><strong>Q39. How would you handle multilingual websites in HTML?<\/strong><\/h3>\n<div style=\"background-color:#c4c6c845; padding:8px; border-radius:4px;\">\n<p style=\"margin:0;\">Use the <code>lang<\/code> attribute to define the document language. For multilingual content, set <code>lang<\/code> on individual elements. Ensure proper encoding (UTF-8) and consider <code>hreflang<\/code> for SEO when serving alternate versions.<\/p>\n<p style=\"margin:0;\"><strong>Example:<\/strong><br>\n<code>&lt;html lang=\"en\"&gt;<\/code> vs <code>&lt;span lang=\"fr\"&gt;Bonjour&lt;\/span&gt;<\/code><\/p>\n<\/div>\n\n<h3><strong>Q40. You need to design an accessible table. How would you implement it?<\/strong><\/h3>\n<div style=\"background-color:#c4c6c845; padding:8px; border-radius:4px;\">\n<p style=\"margin:0;\">Accessible tables require clear headers, captions, and scope attributes for screen readers. Use <code>&lt;caption&gt;<\/code> for context, <code>&lt;th&gt;<\/code> for headers, and <code>scope<\/code> attributes to define relationships.<\/p>\n<p style=\"margin:0;\"><strong>Example:<\/strong><br>\n<code>&lt;table&gt;&lt;caption&gt;Employee List&lt;\/caption&gt;&lt;tr&gt;&lt;th scope=\"col\"&gt;Name&lt;\/th&gt;&lt;\/tr&gt;&lt;\/table&gt;<\/code><\/p>\n<\/div>\n\n\n\n<div style=\"height: 15px;\"><\/div>\n\n\n\n<p class=\"has-background\" style=\"background-color:#ffdeed\"><strong>Read Also: <a href=\"https:\/\/www.foundit.sg\/career-advice\/react-nextjs-interview-questions-answers\/\" target=\"_blank\" rel=\"noreferrer noopener\">React.js + Next.js Interview Questions and Answers<\/a><\/strong><\/p>\n\n\n\n<h2 id=\"html5-specific\">HTML5-Specific Interview Questions<\/h2>\n\n<h3><strong>Q41. What are the new semantic elements introduced in HTML5?<\/strong><\/h3>\n<div style=\"background-color:#c4c6c845; padding:8px; border-radius:4px;\">\n<p style=\"margin:0;\">HTML5 introduced semantic elements that provide meaning to the document structure, making it easier for browsers, developers, and search engines to interpret content. These include <code>&lt;header&gt;<\/code>, <code>&lt;footer&gt;<\/code>, <code>&lt;article&gt;<\/code>, <code>&lt;section&gt;<\/code>, <code>&lt;aside&gt;<\/code>, and <code>&lt;nav&gt;<\/code>. They replace generic <code>&lt;div&gt;<\/code> elements and improve SEO and accessibility.<\/p>\n<p style=\"margin:0;\"><strong>Example:<\/strong><br>\n<code>&lt;article&gt;&lt;h2&gt;Blog Post&lt;\/h2&gt;&lt;p&gt;Content here&lt;\/p&gt;&lt;\/article&gt;<\/code><\/p>\n<\/div>\n\n<h3><strong>Q42. How does the &lt;canvas&gt; element work in HTML5?<\/strong><\/h3>\n<div style=\"background-color:#c4c6c845; padding:8px; border-radius:4px;\">\n<p style=\"margin:0;\">The <code>&lt;canvas&gt;<\/code> element provides a drawing surface that allows developers to render graphics, charts, or animations dynamically using JavaScript. Unlike SVG, Canvas is pixel-based and well-suited for real-time rendering like gaming, image processing, or interactive dashboards.<\/p>\n<p style=\"margin:0;\"><strong>Example:<\/strong><br>\n<code>&lt;canvas id=\"myCanvas\" width=\"200\" height=\"100\"&gt;&lt;\/canvas&gt;<\/code><br>\n<code>var ctx=document.getElementById(\"myCanvas\").getContext(\"2d\"); ctx.fillRect(20,20,150,60);<\/code><\/p>\n<\/div>\n\n<h3><strong>Q43. What are HTML5 form enhancements?<\/strong><\/h3>\n<div style=\"background-color:#c4c6c845; padding:8px; border-radius:4px;\">\n<p style=\"margin:0;\">HTML5 improved form handling with new input types (<code>email<\/code>, <code>url<\/code>, <code>number<\/code>, <code>date<\/code>, <code>color<\/code>), attributes (<code>placeholder<\/code>, <code>required<\/code>, <code>pattern<\/code>, <code>min<\/code>\/<code>max<\/code>), and built-in validation. This reduces the need for JavaScript while enhancing UX and accessibility.<\/p>\n<p style=\"margin:0;\"><strong>Example:<\/strong><br>\n<code>&lt;input type=\"number\" min=\"1\" max=\"10\" required&gt;<\/code><\/p>\n<\/div>\n\n<h3><strong>Q44. How does HTML5 support offline storage?<\/strong><\/h3>\n<div style=\"background-color:#c4c6c845; padding:8px; border-radius:4px;\">\n<p style=\"margin:0;\">HTML5 supports offline-related capabilities mainly through the <strong>Web Storage API<\/strong>, which includes <code>localStorage<\/code> and <code>sessionStorage<\/code>. For modern offline web apps, developers now rely on <strong>Service Workers<\/strong> and caching strategies rather than the old Application Cache, which is deprecated.<\/p>\n<p style=\"margin:0;\"><strong>Example:<\/strong><br>\n<code>localStorage.setItem(\"theme\",\"dark\");<\/code><br>\nThis lets the browser store small pieces of data locally.<\/p>\n<\/div>\n\n<h3><strong>Q45. What is the difference between HTML5 audio and video tags?<\/strong><\/h3>\n<div style=\"background-color:#c4c6c845; padding:8px; border-radius:4px;\">\n<p style=\"margin:0;\">HTML5 introduced <code>&lt;audio&gt;<\/code> and <code>&lt;video&gt;<\/code> elements, allowing native embedding of multimedia without plugins. Both support attributes like <code>controls<\/code>, <code>autoplay<\/code>, <code>loop<\/code>, and <code>muted<\/code>. Video can specify multiple sources for browser compatibility.<\/p>\n<p style=\"margin:0;\"><strong>Example:<\/strong><br>\n<code>&lt;video width=\"400\" controls&gt;&lt;source src=\"movie.mp4\" type=\"video\/mp4\"&gt;&lt;\/video&gt;<\/code><\/p>\n<\/div>\n\n<h3><strong>Q46. What is the difference between Canvas and SVG in HTML5?<\/strong><\/h3>\n<div style=\"background-color:#c4c6c845; padding:8px; border-radius:4px;\">\n<p style=\"margin:0;\"><strong>Canvas<\/strong> is pixel-based and best for high-performance graphics updated frequently (games, charts). <strong>SVG<\/strong> is vector-based and scalable, making it ideal for static images, logos, or charts that need resolution independence. Canvas requires scripting, while SVG is declarative.<\/p>\n<p style=\"margin:0;\"><strong>Example:<\/strong><br>\nCanvas: <code>ctx.arc(75,75,50,0,2*Math.PI); ctx.stroke();<\/code><br>\nSVG: <code>&lt;circle cx=\"75\" cy=\"75\" r=\"50\" stroke=\"black\" fill=\"red\"\/&gt;<\/code><\/p>\n<\/div>\n\n<h3><strong>Q47. How does HTML5 support geolocation?<\/strong><\/h3>\n<div style=\"background-color:#c4c6c845; padding:8px; border-radius:4px;\">\n<p style=\"margin:0;\">The Geolocation API in HTML5 allows web apps to request a user\u2019s location (with consent). This enables location-aware services like maps, weather apps, and local search results. Accuracy depends on GPS, Wi-Fi, or IP address.<\/p>\n<p style=\"margin:0;\"><strong>Example:<\/strong><br>\n<code>navigator.geolocation.getCurrentPosition(function(pos) );<\/code><\/p>\n<\/div>\n\n<h3><strong>Q48. What are HTML5 web workers?<\/strong><\/h3>\n<div style=\"background-color:#c4c6c845; padding:8px; border-radius:4px;\">\n<p style=\"margin:0;\">Web Workers in HTML5 enable background JavaScript execution without blocking the main UI thread. They are useful for heavy computations like image processing, large data parsing, or running algorithms while keeping the interface responsive.<\/p>\n<p style=\"margin:0;\"><strong>Example:<\/strong><br>\n<code>var worker = new Worker(\"worker.js\"); worker.postMessage(\"start\");<\/code><\/p>\n<\/div>\n\n<h3><strong>Q49. How does HTML5 improve accessibility?<\/strong><\/h3>\n<div style=\"background-color:#c4c6c845; padding:8px; border-radius:4px;\">\n<p style=\"margin:0;\">HTML5\u2019s semantic tags improve accessibility by giving meaning to page sections. Combined with ARIA roles and attributes, developers can create web pages that are screen-reader friendly and compliant with WCAG standards. Proper use of <code>&lt;header&gt;<\/code>, <code>&lt;nav&gt;<\/code>, and <code>&lt;main&gt;<\/code> enhances navigation for assistive technologies.<\/p>\n<p style=\"margin:0;\"><strong>Example:<\/strong><br>\n<code>&lt;main role=\"main\"&gt;&lt;h1&gt;Article Title&lt;\/h1&gt;&lt;\/main&gt;<\/code><\/p>\n<\/div>\n\n<h3><strong>Q50. How does HTML5 handle responsive design?<\/strong><\/h3>\n<div style=\"background-color:#c4c6c845; padding:8px; border-radius:4px;\">\n<p style=\"margin:0;\">Responsive design in HTML5 is facilitated by the <code>&lt;meta name=\"viewport\"&gt;<\/code> tag, semantic structure, and media queries in CSS. HTML5\u2019s fluid grid support, responsive images (<code>srcset<\/code> and <code>sizes<\/code>), and modern layout techniques help build mobile-first applications.<\/p>\n<p style=\"margin:0;\"><strong>Example:<\/strong><br>\n<code>&lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"&gt;<\/code><br>\n<code>&lt;img src=\"small.jpg\" srcset=\"large.jpg 1024w, medium.jpg 640w\" sizes=\"(max-width: 600px) 480px, 1024px\"&gt;<\/code><\/p>\n<\/div>\n\n\n\n<div style=\"height: 15px;\"><\/div>\n\n\n\n<p class=\"has-background\" style=\"background-color:#ffdeed\"><strong>Read Also: <a href=\"https:\/\/www.foundit.sg\/career-advice\/8-frequently-asked-html-interview-question-for-experienced-professionals\/\" target=\"_blank\" rel=\"noreferrer noopener\">HTML Interview Question for Experienced Professionals<\/a><\/strong><\/p>\n\n\n\n<h2 id=\"checklist\">Checklist: Quick Prep Before Your HTML Interview<\/h2>\n\n<div style=\"background-color:#B4E2FF; padding:12px; border-radius:6px;\">\n<p style=\"margin:0;\"><strong>\u2714\ufe0f HTML Interview Quick Prep Checklist<\/strong><\/p>\n<ul style=\"margin:0; padding-left:20px;\">\n  <li>Revise the <strong>basic structure of an HTML document<\/strong> \u2014 <code>&lt;!DOCTYPE html&gt;<\/code>, <code>&lt;html&gt;<\/code>, <code>&lt;head&gt;<\/code>, <code>&lt;body&gt;<\/code>.<\/li>\n  <li>Memorise the most common <strong>HTML tags<\/strong>: headings, paragraphs, links, images, lists, forms, tables.<\/li>\n  <li>Understand <strong>semantic HTML5 elements<\/strong> (<code>&lt;header&gt;<\/code>, <code>&lt;nav&gt;<\/code>, <code>&lt;article&gt;<\/code>) and their SEO benefits.<\/li>\n  <li>Be clear on the <strong>difference between inline, block, and inline-block elements<\/strong>.<\/li>\n  <li>Know <strong>HTML forms &#038; attributes<\/strong>: input types, validation, <code>required<\/code>, <code>pattern<\/code>, <code>placeholder<\/code>.<\/li>\n  <li>Review <strong>multimedia tags<\/strong> \u2014 <code>&lt;audio&gt;<\/code>, <code>&lt;video&gt;<\/code>, <code>&lt;source&gt;<\/code>.<\/li>\n  <li>Understand <strong>HTML APIs<\/strong>: localStorage, sessionStorage, Canvas, Geolocation, Web Workers.<\/li>\n  <li>Revise <strong>HTML accessibility practices<\/strong>: ARIA roles, <code>alt<\/code> text, <code>label<\/code> in forms.<\/li>\n  <li>Practice <strong>SEO-friendly HTML<\/strong>: correct heading hierarchy, meta descriptions, <code>alt<\/code> attributes.<\/li>\n  <li>Know <strong>differences between HTML vs HTML5<\/strong> and why HTML5 is used in modern applications.<\/li>\n  <li>Prepare examples of <strong>real-world scenarios<\/strong>: responsive design with viewport, lazy loading images, handling large forms.<\/li>\n<\/ul>\n<\/div>\n\n\n\n<div style=\"height: 15px;\"><\/div>\n\n\n\n<p class=\"has-background\" style=\"background-color:#ffdeed\"><strong>Read Also: <a href=\"https:\/\/www.foundit.sg\/career-advice\/10-important-questions-to-help-you-ace-your-c-programming-interview\/\" target=\"_blank\" rel=\"noreferrer noopener\">C Programming Interview Questions and Answers<\/a><\/strong><\/p>\n\n\n\n<h2 id=\"comparison\">Comparison Table: HTML vs HTML5<\/h2>\n\n<table style=\"width:100%; border-collapse:collapse; text-align:left;\">\n  <thead>\n    <tr style=\"background-color:#c4c6c845;\">\n      <th style=\"padding:8px; border:1px solid #ccc;\">Feature<\/th>\n      <th style=\"padding:8px; border:1px solid #ccc;\">HTML<\/th>\n      <th style=\"padding:8px; border:1px solid #ccc;\">HTML5<\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n    <tr>\n      <td style=\"padding:8px; border:1px solid #ccc;\">Specification<\/td>\n      <td style=\"padding:8px; border:1px solid #ccc;\">Older standard of web markup.<\/td>\n      <td style=\"padding:8px; border:1px solid #ccc;\">Latest specification with extended features.<\/td>\n    <\/tr>\n    <tr>\n      <td style=\"padding:8px; border:1px solid #ccc;\">Doctype<\/td>\n      <td style=\"padding:8px; border:1px solid #ccc;\"><code>&lt;!DOCTYPE HTML PUBLIC \"-\/\/W3C\/\/DTD HTML 4.01\/\/EN\"&gt;<\/code><\/td>\n      <td style=\"padding:8px; border:1px solid #ccc;\"><code>&lt;!DOCTYPE html&gt;<\/code> (simpler, shorter).<\/td>\n    <\/tr>\n    <tr>\n      <td style=\"padding:8px; border:1px solid #ccc;\">Multimedia Support<\/td>\n      <td style=\"padding:8px; border:1px solid #ccc;\">Requires plugins like Flash for audio\/video.<\/td>\n      <td style=\"padding:8px; border:1px solid #ccc;\">Native <code>&lt;audio&gt;<\/code> and <code>&lt;video&gt;<\/code> tags.<\/td>\n    <\/tr>\n    <tr>\n      <td style=\"padding:8px; border:1px solid #ccc;\">Graphics<\/td>\n      <td style=\"padding:8px; border:1px solid #ccc;\">No built-in support for graphics.<\/td>\n      <td style=\"padding:8px; border:1px solid #ccc;\">Supports <code>&lt;canvas&gt;<\/code> and <code>&lt;svg&gt;<\/code>.<\/td>\n    <\/tr>\n    <tr>\n      <td style=\"padding:8px; border:1px solid #ccc;\">Storage<\/td>\n      <td style=\"padding:8px; border:1px solid #ccc;\">Cookies are the primary client-side storage option.<\/td>\n      <td style=\"padding:8px; border:1px solid #ccc;\">Introduced Web Storage API: <code>localStorage<\/code>, <code>sessionStorage<\/code>.<\/td>\n    <\/tr>\n    <tr>\n      <td style=\"padding:8px; border:1px solid #ccc;\">Form Features<\/td>\n      <td style=\"padding:8px; border:1px solid #ccc;\">Limited input types and validation.<\/td>\n      <td style=\"padding:8px; border:1px solid #ccc;\">New input types (<code>email<\/code>, <code>date<\/code>, <code>number<\/code>) and validation attributes.<\/td>\n    <\/tr>\n    <tr>\n      <td style=\"padding:8px; border:1px solid #ccc;\">Semantic Elements<\/td>\n      <td style=\"padding:8px; border:1px solid #ccc;\">Mostly <code>&lt;div&gt;<\/code> and <code>&lt;span&gt;<\/code> for layout.<\/td>\n      <td style=\"padding:8px; border:1px solid #ccc;\">Added <code>&lt;header&gt;<\/code>, <code>&lt;footer&gt;<\/code>, <code>&lt;article&gt;<\/code>, <code>&lt;section&gt;<\/code>, <code>&lt;nav&gt;<\/code>.<\/td>\n    <\/tr>\n    <tr>\n      <td style=\"padding:8px; border:1px solid #ccc;\">APIs<\/td>\n      <td style=\"padding:8px; border:1px solid #ccc;\">No built-in API support.<\/td>\n      <td style=\"padding:8px; border:1px solid #ccc;\">Supports APIs like Geolocation, Drag-and-Drop, Web Workers.<\/td>\n    <\/tr>\n    <tr>\n      <td style=\"padding:8px; border:1px solid #ccc;\">Mobile\/Responsive<\/td>\n      <td style=\"padding:8px; border:1px solid #ccc;\">No viewport or responsive features.<\/td>\n      <td style=\"padding:8px; border:1px solid #ccc;\">Supports responsive design with <code>&lt;meta name=\"viewport\"&gt;<\/code> and responsive images.<\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n\n\n<div style=\"height: 15px;\"><\/div>\n\n\n\n<p class=\"has-background\" style=\"background-color:#ffdeed\"><strong>Read Also: <a href=\"https:\/\/www.foundit.sg\/career-advice\/programming-interview-questions-and-answers\/\" target=\"_blank\" rel=\"noreferrer noopener\">Programming Interview Questions and Answers<\/a><\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"faqs\">FAQs on HTML Interviews<\/h2>\n\n\n\n<div class=\"wp-block-group has-background\" style=\"background-color:#ABB7C245; padding:10px; border-radius:6px;\">\n\n<details>\n  <summary><strong>\ud83d\udd3d What are the most asked HTML interview questions for freshers?<\/strong><\/summary>\n  <div>The most asked <strong>HTML interview questions for freshers<\/strong> usually cover HTML basics, tags, elements, attributes, lists, forms, semantic HTML, block vs inline elements, and the difference between HTML and HTML5. Interviewers often start with these to test whether your foundation is clear.<\/div>\n<\/details>\n\n<details>\n  <summary><strong>\ud83d\udd3d What is the difference between HTML and HTML5 in interviews?<\/strong><\/summary>\n  <div><strong>HTML5<\/strong> is the modern version of HTML. It introduced semantic tags such as <code>&lt;header&gt;<\/code> and <code>&lt;article&gt;<\/code>, native multimedia with <code>&lt;audio&gt;<\/code> and <code>&lt;video&gt;<\/code>, improved forms, browser storage, and APIs like Geolocation and Web Workers.<\/div>\n<\/details>\n\n<details>\n  <summary><strong>\ud83d\udd3d How should I prepare for HTML interview questions quickly?<\/strong><\/summary>\n  <div>Start with the structure of an HTML document, revise common tags and attributes, practice forms and semantic elements, review HTML5 features, and understand accessibility basics such as labels, alt text, and ARIA roles. It also helps to practise answering with short examples.<\/div>\n<\/details>\n\n<details>\n  <summary><strong>\ud83d\udd3d Are HTML interview questions asked only in front-end developer roles?<\/strong><\/summary>\n  <div>No. HTML questions are also common in interviews for web developers, UI developers, email developers, full-stack developers, and software engineers who work on browser-based products. Even when JavaScript frameworks are used, interviewers still expect strong HTML fundamentals.<\/div>\n<\/details>\n\n<details>\n  <summary><strong>\ud83d\udd3d Why is semantic HTML important in interviews?<\/strong><\/summary>\n  <div>Semantic HTML is important because it improves structure, accessibility, maintainability, and SEO. Interviewers ask about it to check whether you can build pages that are easier for browsers, search engines, and assistive technologies to understand.<\/div>\n<\/details>\n\n<details>\n  <summary><strong>\ud83d\udd3d What HTML5 topics are important for experienced candidates?<\/strong><\/summary>\n  <div>For experienced candidates, interviewers often ask about Web Storage, Canvas vs SVG, multimedia tags, form validation, accessibility, performance, responsive images, script loading with <code>async<\/code> and <code>defer<\/code>, and real-world HTML optimisation scenarios.<\/div>\n<\/details>\n\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>HTML remains one of the most frequently tested skills in frontend and UI developer interviews across Singapore. Companies like DBS, Grab, Singtel, and Shopee often begin technical rounds with HTML interview questions to evaluate a candidate\u2019s fundamentals before moving on to CSS, JavaScript, or frameworks. This list of Top 50 HTML Interview Questions and Answers [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":48622,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[147],"tags":[],"class_list":{"0":"post-48616","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-interview-questions"},"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.foundit.sg\/career-advice\/wp-json\/wp\/v2\/posts\/48616","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.foundit.sg\/career-advice\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.foundit.sg\/career-advice\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.foundit.sg\/career-advice\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.foundit.sg\/career-advice\/wp-json\/wp\/v2\/comments?post=48616"}],"version-history":[{"count":9,"href":"https:\/\/www.foundit.sg\/career-advice\/wp-json\/wp\/v2\/posts\/48616\/revisions"}],"predecessor-version":[{"id":50804,"href":"https:\/\/www.foundit.sg\/career-advice\/wp-json\/wp\/v2\/posts\/48616\/revisions\/50804"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.foundit.sg\/career-advice\/wp-json\/wp\/v2\/media\/48622"}],"wp:attachment":[{"href":"https:\/\/www.foundit.sg\/career-advice\/wp-json\/wp\/v2\/media?parent=48616"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.foundit.sg\/career-advice\/wp-json\/wp\/v2\/categories?post=48616"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.foundit.sg\/career-advice\/wp-json\/wp\/v2\/tags?post=48616"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}