Posts

Showing posts with the label HTML

HTML Interview Questions

Image
HTML interview questions along with their answers that are commonly asked by companies: 1. What is HTML? Answer: HTML, or HyperText Markup Language, is the standard language for creating and designing web pages. 2. Explain the structure of an HTML document. Answer: An HTML document consists of the following elements: <!DOCTYPE html> <html>   <head>     <title>Page Title</title>   </head>   <body>     <!-- Content goes here -->   </body> </html> 3. What is the purpose of the <!DOCTYPE html> declaration? Answer: It specifies the HTML version being used, and in this case, it indicates HTML5. 4. What is the difference between HTML and XHTML? Answer: XHTML is a stricter and more XML-based version of HTML. It requires well-formed documents and adheres to XML syntax rules. 5. Explain the difference between <div> and <span> elements. Answer: <div> is a block-level element used to group other HTML ele