Questions List
- What is HTML?
- What is the difference between HTML and HTML5?
- What is the purpose of DOCTYPE in HTML?
- What is the basic structure of an HTML document?
- What is the difference between a tag and an element?
- What are HTML attributes?
- What is the difference between id and class?
- What are semantic HTML elements?
- Why is Semantic HTML important?
- What is the difference between div and span?
- What are block elements?
- What are inline elements?
- What is the purpose of the head tag?
- What are Meta Tags?
- What is the viewport meta tag?
- What is the difference between relative and absolute paths?
- What is the img tag?
- Why is the alt attribute important?
- What are HTML entities?
- What is the difference between Ordered and Unordered Lists?
- What is a Description List?
- What is a Hyperlink?
- How do you open a link in a new tab?
- What is the purpose of the target attribute?
- What is an iframe?
- What is the difference between GET and POST?
- What is a Form?
- What is the action attribute in forms?
- What is the method attribute in forms?
- What is the label tag?
- What are common input types in HTML?
- Difference between Radio and Checkbox?
- What is the placeholder attribute?
- What is the required attribute?
- What is the readonly attribute?
- What is the disabled attribute?
- What is HTML Accessibility?
- What is SEO in HTML?
- Which HTML tags help SEO?
- What is the difference between b and strong?
- What is the difference between i and em?
- What are empty elements?
- What is the purpose of comments in HTML?
- What is HTML5 Local Storage?
- What is the difference between Local Storage and Session Storage?
- What is the Audio tag?
- What is the Video tag?
- What is the Canvas element?
- What is the difference between HTML CSS and JavaScript?
- Why should we learn HTML?
1. What is HTML?
HTML (HyperText Markup Language) is the standard markup language used to create and structure web pages.
2. What is the difference between HTML and HTML5?
HTML5 is the latest version of HTML.
New features:
- Semantic tags
- Audio & Video support
- Canvas
- Local Storage
- New input types
3. What is the purpose of DOCTYPE in HTML?
It tells the browser that the document uses HTML5.
<!DOCTYPE html>
4. What is the basic structure of an HTML document?
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
</body>
</html>
5. What is the difference between a tag and an element?
Tag
<p>
Element
<p>Hello World</p>
An element includes opening tag, content, and closing tag.
6. What are HTML attributes?
Attributes provide extra information about HTML elements.
Example:
<a href="https://google.com">Google</a>
7. What is the difference between id and class?
id
- Unique
- Used once per page
class
- Reusable
- Used multiple times
8. What are semantic HTML elements?
Semantic elements describe the meaning of content.
Examples:
<header>
<nav>
<section>
<article>
<footer>
9. Why is Semantic HTML important?
Benefits:
- Better SEO
- Better Accessibility
- Cleaner code structure
10. What is the difference between div and span?
div
- Block element
span
- Inline element
11. What are block elements?
Elements that take the full available width.
Examples:
<div>
<p>
<h1>
<section>
12. What are inline elements?
Elements that only take required width.
Examples:
<span>
<a>
<strong>
13. What is the purpose of the head tag?
Stores metadata such as:
- Title
- CSS files
- Meta tags
- Scripts
14. What are Meta Tags?
Meta tags provide information about the webpage.
Example:
<meta charset="UTF-8">
15. What is the viewport meta tag?
Used for responsive websites.
<meta name="viewport" content="width=device-width, initial-scale=1.0">
16. What is the difference between relative and absolute paths?
Relative
images/logo.png
Absolute
https://example.com/logo.png
17. What is the img tag?
Used to display images.
<img src="image.jpg" alt="Image">
18. Why is the alt attribute important?
- Accessibility
- SEO
- Fallback text
<img src="cat.jpg" alt="Cat Image">
19. What are HTML entities?
Special characters represented using codes.
Examples:
<
>
©
20. What is the difference between Ordered and Unordered Lists?
Ordered List
<ol>
Shows numbers.
Unordered List
<ul>
Shows bullet points.
21. What is a Description List?
Used for terms and descriptions.
<dl>
<dt>HTML</dt>
<dd>Markup Language</dd>
</dl>
22. What is a Hyperlink?
A clickable link created using:
<a>
23. How do you open a link in a new tab?
<a href="#" target="_blank">
24. What is the purpose of the target attribute?
It defines where the linked document opens.
25. What is an iframe?
Used to embed another webpage.
<iframe src=""></iframe>
26. What is the difference between GET and POST?
GET
- Data visible in URL
POST
- Data hidden
- More secure
27. What is a Form?
Forms are used to collect user data.
<form>
28. What is the action attribute in forms?
Defines where the form data will be sent.
29. What is the method attribute in forms?
Defines how data is submitted.
Examples:
- GET
- POST
30. What is the label tag?
Connects text with form inputs.
<label>
31. What are common input types in HTML?
- text
- password
- number
- radio
- checkbox
- file
- date
32. Difference between Radio and Checkbox?
Radio
Only one option can be selected.
Checkbox
Multiple options can be selected.
33. What is the placeholder attribute?
Shows hint text inside input fields.
34. What is the required attribute?
Makes a field mandatory.
35. What is the readonly attribute?
Makes the field non-editable.
36. What is the disabled attribute?
Disables an input field.
37. What is HTML Accessibility?
Making websites usable for everyone, including people with disabilities.
38. What is SEO in HTML?
SEO means optimizing webpages for search engines.
39. Which HTML tags help SEO?
- h1 to h6
- title
- meta
- article
- section
40. What is the difference between b and strong?
b
Visual bold text.
strong
Important text with semantic meaning.
41. What is the difference between i and em?
i
Italic text.
em
Emphasized text with meaning.
42. What are empty elements?
Elements without closing tags.
Examples:
<br>
<hr>
<img>
43. What is the purpose of comments in HTML?
Used for notes inside code.
<!-- Comment -->
44. What is HTML5 Local Storage?
Stores data inside the browser permanently until removed.
45. What is the difference between Local Storage and Session Storage?
Local Storage
Persists until manually removed.
Session Storage
Removed when browser tab closes.
46. What is the Audio tag?
Used to play audio files.
<audio>
47. What is the Video tag?
Used to play videos.
<video>
48. What is the Canvas element?
Used for graphics and drawing.
<canvas>
49. What is the difference between HTML CSS and JavaScript?
HTML
Structure
CSS
Styling
JavaScript
Interactivity
50. Why should we learn HTML?
HTML is the foundation of every website.
Without HTML, webpages cannot be structured properly.
Top comments (1)
Nice beginner-friendly collection. One small but important correction: POST is not inherently “more secure” than GET. It keeps form data out of the URL, but the request body still needs HTTPS, and sensitive operations still require proper authentication, authorization, and CSRF protection.
I’d phrase it as: GET is generally used to retrieve data and may expose parameters in the URL, while POST sends data in the request body and is commonly used for submissions or state-changing operations.
Reference: WHATWG HTML Standard — Forms
html.spec.whatwg.org/multipage/for...
Solid list overall; fixing that distinction would prevent a very common beginner misconception.