Loading

Quipoin Menu

Learn • Practice • Grow

html / Attributes
interview

Q1. What are HTML attributes?
HTML attributes provide additional information about HTML elements. They are always specified in the start tag and usually come in name/value pairs.

Q2. What is the syntax for writing attributes?
Attributes are written as name="value" inside the opening tag. Example: <a href="https://example.com">Link</a>.

Q3. What are some commonly used HTML attributes?
Common attributes include: id, class, src, href, alt, title, style, lang, and data-* attributes for custom data.

Q4. What is the difference between id and class attributes?
id must be unique within a page and is used for one element. class can be reused on multiple elements for styling purposes.

Q5. What are boolean attributes? Give examples.
Boolean attributes don't need a value - their presence indicates true. Examples: disabled, checked, readonly, required.