41. Which HTML attribute specifies an alternate text for an image?
- a) src
- b) alt
- c) title
- d) description
Answer: B - The alt attribute provides alternative information for an image if it cannot be displayed.
42. Which HTML attribute specifies that an input field must be filled out?
- a) required
- b) validate
- c) mandatory
- d) mustfill
Answer: A - The required attribute specifies that an input field must be filled out before submitting the form.
43. Which HTML attribute specifies a unique id for an element?
- a) class
- b) name
- c) id
- d) element-id
Answer: C - The id attribute specifies a unique id for an HTML element.
44. Which HTML attribute specifies one or more classnames for an element?
- a) id
- b) name
- c) class
- d) style
Answer: C - The class attribute specifies one or more classnames for an element.
45. Which HTML attribute specifies inline CSS styles for an element?
- a) css
- b) design
- c) style
- d) format
Answer: C - The style attribute specifies inline CSS styles for an element.
46. Which HTML attribute specifies the language of the document?
- a) lang
- b) language
- c) xml:lang
- d) doclang
Answer: A - The lang attribute specifies the language of the element's content.
47. Which HTML attribute specifies that an input field is read-only?
- a) readonly
- b) disabled
- c) static
- d) locked
Answer: A - The readonly attribute specifies that an input field is read-only.
48. Which HTML attribute specifies that an element is not yet relevant?
- a) hidden
- b) disabled
- c) inactive
- d) irrelevant
Answer: A - The hidden attribute specifies that an element is not yet relevant.
49. Which HTML attribute specifies the maximum value for an input element?
- a) top
- b) maximum
- c) max
- d) ceiling
Answer: C - The max attribute specifies the maximum value for an input element.
50. Which HTML attribute specifies the number of visible options in a drop-down list?
- a) visible
- b) size
- c) length
- d) display
Answer: B - The size attribute specifies the number of visible options in a drop-down list.
51. Which HTML attribute specifies that an input field should be pre-selected?
- a) selected
- b) checked
- c) default
- d) active
Answer: B - The checked attribute specifies that an input field should be pre-selected.
52. Which HTML attribute specifies the legal number intervals for an input field?
- a) step
- b) interval
- c) increment
- d) scale
Answer: A - The step attribute specifies the legal number intervals for an input field.
53. Which HTML attribute specifies that the element is draggable?
- a) moveable
- b) drag
- c) draggable
- d) drop
Answer: C - The draggable attribute specifies whether an element is draggable.
54. Which HTML attribute specifies the relationship between current and linked documents?
- a) rel
- b) href
- c) link
- d) connection
Answer: A - The rel attribute specifies the relationship between current and linked documents.
55. Which HTML attribute specifies the character encoding for the document?
- a) encoding
- b) charset
- c) character
- d) meta
Answer: B - The charset attribute specifies the character encoding for the HTML document.
56. Which HTML attribute specifies the target for a hyperlink?
- a) window
- b) target
- c) open
- d) destination
Answer: B - The target attribute specifies where to open the linked document.
57. Which HTML attribute specifies the type of an input element?
- a) input
- b) form
- c) type
- d) format
Answer: C - The type attribute specifies the type of an input element.
58. Which HTML attribute specifies the name of an input element?
- a) id
- b) name
- c) field
- d) element
Answer: B - The name attribute specifies the name of an input element.
59. Which HTML attribute specifies the initial value for an input field?
- a) initial
- b) default
- c) value
- d) preset
Answer: C - The value attribute specifies the initial value for an input field.
60. Which HTML attribute specifies the placeholder text in an input field?
- a) hint
- b) placeholder
- c) text
- d) example
Answer: B - The placeholder attribute specifies a short hint that describes the expected value of an input field.