๐ง 15. What are Void Elements?
Void elements do not require closing tags.
Examples:
- <br>
- <hr>
- <img>
- <input>
๐ง 16. What is the Purpose of alt Attribute?
alt provides alternative text for images.
Example:
<img src="cat.jpg" alt="Cute Cat">
Benefits:
โ
Accessibility
โ
SEO
โ
Backup text if image fails
๐ง 17. Explain Audio and Video Tags
HTML5 provides multimedia support.
Audio Example:
<audio controls>
<source src="song.mp3">
</audio>
Video Example:
<video controls width="400">
<source src="movie.mp4">
</video>
๐ง 18. What is Accessibility in HTML?
Accessibility means making websites usable for everyone.
Best Practices:
- Semantic HTML
- Alt text
- Proper headings
- Keyboard support
๐ง 19. What are ARIA Attributes?
ARIA improves accessibility for screen readers.
Example:
<button aria-label="Search">
Common ARIA Attributes:
- aria-label
- aria-hidden
- aria-expanded
๐ง 20. Difference Between <strong> and <b>
<strong> : Semantic importance
<b> : Only bold styling
<strong> : Used for important text
<b> : Used for design
Example:
<strong>Important</strong>
<b>Bold Text</b>
Double Tap โค๏ธ For Part-2
Post #3751
3.08K
- โค 23