0% found this document useful (0 votes)
3 views

HTML_Interview_Questions

The document provides a list of common HTML interview questions and answers, covering topics such as the definition of HTML, the purpose of HTML tags, and differences between various HTML elements. It explains concepts like semantic HTML, the use of the <meta> tag, and the distinction between id and class attributes. Additionally, it discusses hyperlinks and empty elements in HTML.

Uploaded by

krianlata160
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

HTML_Interview_Questions

The document provides a list of common HTML interview questions and answers, covering topics such as the definition of HTML, the purpose of HTML tags, and differences between various HTML elements. It explains concepts like semantic HTML, the use of the <meta> tag, and the distinction between id and class attributes. Additionally, it discusses hyperlinks and empty elements in HTML.

Uploaded by

krianlata160
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

HTML Interview Questions and Answers

1. What is HTML?

HTML stands for HyperText Markup Language. It is the standard language used to create web pages.

2. What are HTML tags?

HTML tags are keywords enclosed in angle brackets like <tagname>. They define elements on a webpage.

3. What is the difference between <div> and <span>?

<div> is a block-level element. <span> is an inline element.

4. What is the difference between HTML and HTML5?

HTML5 is the latest version. It supports new elements like <audio>, <video>, and works better for mobile

devices.

5. What is semantic HTML?

Semantic HTML uses tags that describe the meaning of the content, like <header>, <footer>, <nav>.

6. What is the use of the <meta> tag?

The <meta> tag provides metadata about the HTML document.

7. What is the difference between id and class?

id is unique and used for one element. class can be reused for multiple elements.

8. What is the use of the alt attribute in <img> tag?

The alt attribute provides alternative text for an image if it fails to load.
HTML Interview Questions and Answers

9. What is a hyperlink in HTML?

A hyperlink is created using the <a> tag to link to another page or site.

10. What are empty (void) elements in HTML?

Empty elements do not have a closing tag. Examples: <br>, <hr>, <img>, <input>.

You might also like