prep-html-syntax Flashcards
1
Q
Do all HTML elements require a closing tag?
A
No, elements like the “br” tag do not require a closing tag. They are called empty elements.
2
Q
What are attributes for in HTML?
A
Attributes are used to provide additional information about HTML elements.
3
Q
What is the purpose of the alt attribute used on “img” elements?
A
The purpose of the alt attribute used on “img” elements is to provide text if the image is unable to load due to a “src” error or if the user needs a screen reader.
4
Q
How many heading elements are available in HTML?
A
6 heading elements are available in HTML with h1 being the biggest and most important and h6 being the smallest and least important.