[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-391791-105":3,"detail-sidebar-cat-0-en-105":81,"doc-detail-391791-en":131},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":74,"head_meta":76,"extra_data":78,"updated_unix":80},105,"en","html-interview-questions-and-answers-for-freshers","HTML Interview Questions and Answers for Freshers","","HTML Interview Questions and Answers for Freshers provides concise explanations to common entry-level HTML interview topics, covering core structure and semantics. It explains differences between inline and block elements, HTML elements versus tags, and when end tags are required. The document also addresses hyperlinks, headings levels, div vs span, semantic HTML, image alt and meta tag purposes, ID vs class, the box model, and essential HTML coding best practices. Additional questions cover XHTML vs HTML, marquee behavior, iframes for nested content, and image maps with clickable areas.",{"@graph":14,"@context":73},[15,34,56],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/exam/","Exam",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/html-interview-questions-and-answers-for-freshers/391791/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/html-interview-questions-and-answers-for-freshers/391791.png","ImageObject",300,407,{"name":42,"@type":43},"นรินทร์","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-08","2026-09-25",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",12,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69],{"name":60,"@type":61,"acceptedAnswer":62},"What is the difference between inline and block elements in HTML?","Question",{"text":63,"@type":64},"Inline elements display within a line of text and do not start on a new line, while block elements create a new line and take up the full width of the container.","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"Do all HTML tags have an end tag?",{"text":68,"@type":64},"No. Tags without an end tag are called empty tags (empty/self-closing/void elements), such as the \u003Cbr> tag for line breaks.",{"name":70,"@type":61,"acceptedAnswer":71},"What is semantic HTML and why is it useful?",{"text":72,"@type":64},"Semantic HTML uses specific tags that describe the meaning of the content instead of only using generic tags like div and span. It helps improve accessibility and SEO.","https://schema.org",{"og:url":32,"og:type":75,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":77,"canonical":32},"index,follow",{"doc_id":79,"site_id":7},391791,1790763870,{"code":4,"msg":82,"data":83},"success",[84,88,92,95,100,105,110,115,120,123,127],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":85,"show_sort_weight":86,"slug":87},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":89,"show_sort_weight":90,"slug":91},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":93,"slug":94},70,"exam",{"id":96,"doc_module":4,"doc_module_name":25,"category_name":97,"show_sort_weight":98,"slug":99},5,"Comic",60,"comic",{"id":101,"doc_module":4,"doc_module_name":25,"category_name":102,"show_sort_weight":103,"slug":104},6,"Technology",50,"technology",{"id":106,"doc_module":4,"doc_module_name":25,"category_name":107,"show_sort_weight":108,"slug":109},7,"Healthcare",40,"healthcare",{"id":111,"doc_module":4,"doc_module_name":25,"category_name":112,"show_sort_weight":113,"slug":114},8,"Research & Report",30,"research-report",{"id":116,"doc_module":4,"doc_module_name":25,"category_name":117,"show_sort_weight":118,"slug":119},9,"Religion & Spirituality",20,"religion-spirituality",{"id":118,"doc_module":4,"doc_module_name":25,"category_name":121,"show_sort_weight":118,"slug":122},"World Cup","world-cup",{"id":124,"doc_module":4,"doc_module_name":25,"category_name":125,"show_sort_weight":124,"slug":126},10,"Lifestyle","lifestyle",{"id":128,"doc_module":4,"doc_module_name":25,"category_name":129,"show_sort_weight":96,"slug":130},19,"General","general",{"code":4,"msg":82,"data":132},{"doc_id":79,"user_id":133,"nickname":42,"user_avatar":134,"doc_module":4,"category_id":33,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":135,"file_id":136,"file_url":137,"file_type":138,"file_size":139,"view_count":55,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":30,"language":140,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":12,"update_tm":144,"read_time":111,"preview_page_count":4},2336475104957,"https://ap-avatar.wpscdn.com/avatar/22000c4c6bd8a5076e1?x-image-process=image/resize,m_fixed,w_180,h_180&k=1787554080175789136","| \u003Cbr>HTML Interview Questions and Answers for Freshers\u003Cbr>1. Difference between Inline and Block Element\u003Cbr>1. Inline Element: Inline elements are those HTML elements that are displayed within aline of text. These tags do not start with a new line. And width of Inline elements only extends as far as it is defined by its tags.\u003Cbr>2. Block Element: Block elements are those that create a new line and take up the full width of their container. Block elements starts from a new line on a webpage and extends the full width of the available horizontal space of its parent element.\u003Cbr>2. Do all HTML Tags have an end tag?\u003Cbr>No, all the HTML tags don’t have end tag. And the HTML tags who don’t have end tag are called empty tags.\u003Cbr>For example: \u003Cbr> tag is used to break the line. And it doesn’t have an end tag.\u003Cbr>3. How to create a hyperlink in HTML?\u003Cbr>In HTML we can create hyperlinks with the help of anchor tag. It contains a href attribute which define the URL or hypertext. And \u003Ca> and \u003C/a> tags are used to create hyperlink.\u003Cbr>4. How many types of heading does an HTML contain?\u003Cbr>HTML contains six levels of headings, and these heading elements are h1, h2, h3, h4, and h6. In these h1 is the highest or the most important level, and the h6 element is the least important. And h6 is the smallest heading.\u003Cbr>5. What is the difference between HTML elements and tags.\u003Cbr>An HTML element is the collection of a start tag, its attributes, and end tag or everything in between.\u003Cbr>While HTML Tag (either opening and closing) is used to mark the start or end of an element. |  |\n| --- | --- |\n|  |  |\n\n\n| \u003Cbr>All HTML elements don’t require the end tag or closing tag. And the HTML tags which don’t need closing tag are referred as empty elements, self-closing elements or void elements.\u003Cbr>6. What are the basic structure and tags of an HTML document?\u003Cbr>An HTML document has a basic structure that includes an opening and closing HTML tag, a head tag with a title, and a body tag that contains the content of the webpage.\u003Cbr>Some commonly used HTML tags are h1-h6 for headings, p for paragraph, a for links, img for images, and div for dividing sections of the page.\u003Cbr>7. What is the difference between div and span tags?\u003Cbr>The HTML div tag is used for division. It is used to divide a page into sections, while the span tag is used to apply styles to small pieces of text within a larger block of content.\u003Cbr>Where div is a block-level HTML element and span is a inline-level HTML element.\u003Cbr>8. What is semantic HTML?\u003Cbr>Semantic HTML is the use of specific HTML tags to indicate the meaning of the content on a page, rather than just using generic tags like div and span. Semantic HTML also helps to improve accessibility and SEO of website.\u003Cbr>9. What is the role of the alt attribute in an image tag?\u003Cbr>The alt attribute in img tag provides the alternative text that is displayed when the image not loaded or if the user is using a screen reader to access the content.\u003Cbr>10. What is the purpose of the \u003Cmeta> tag?\u003Cbr>The meta tag provides metadata about the HTML document. Meta tag contains the information of webpage like the page title, description, and keywords for SEO (Search Engine Optimization) .\u003Cbr>11. What is the difference between HTML and XHTML?\u003Cbr>XHTML is a stricter version of HTML which requires well-formed code and it follows XML rules, while HTML is more forgiving and allows for more flexibility in coding. |  |\n| --- | --- |\n|  |  |\n\n\n| \u003Cbr>12. What is the difference between an ID and a class in HTML?\u003Cbr>An ID is a unique identifier for an HTML element, and a HTML element can contains only one ID, while a class is a way of grouping multiple elements together for styling purposes. And a HTML element can contain more than one class and more than one HTML elements can contain the same class.\u003Cbr>13. What is the box model in HTML and CSS?\u003Cbr>The box model is a way of representing an HTML element as a rectangular box with content, padding, borders, and margin","cbCaiggPdq0cY09C","https://ap.wps.com/l/cbCaiggPdq0cY09C","pdf",95616,"English","# HTML Interview Questions and Answers for Freshers\n## Inline vs Block Elements\n## HTML Tags: End Tags, Empty Elements, Links, Headings, Elements vs Tags\n## HTML Document Structure and Common Tags\n## div vs span, Semantic HTML, alt Attribute, meta Tag\n## HTML vs XHTML, ID vs Class, Box Model\n## HTML Best Practices, marquee, iframe, Image Map","[{\"question\":\"What is the difference between inline and block elements in HTML?\",\"answer\":\"Inline elements display within a line of text and do not start on a new line, while block elements create a new line and take up the full width of the container.\"},{\"question\":\"Do all HTML tags have an end tag?\",\"answer\":\"No. Tags without an end tag are called empty tags (empty/self-closing/void elements), such as the \\u003cbr\\u003e tag for line breaks.\"},{\"question\":\"What is semantic HTML and why is it useful?\",\"answer\":\"Semantic HTML uses specific tags that describe the meaning of the content instead of only using generic tags like div and span. It helps improve accessibility and SEO.\"}]","HTML Interview Questions and Answers for Freshers | PDF",1790358751]