Complete the code to add an alternative text for the image for accessibility.
<img src="flower.jpg" alt=[1]>
The alt attribute should describe the image content for screen readers. It needs to be a descriptive text in quotes.
Complete the code to make the link open in a new tab safely.
<a href="https://example.com" target=[1] rel="noopener noreferrer">Visit</a>
The target="_blank" attribute opens the link in a new tab. The rel="noopener noreferrer" improves security and performance.
Fix the error by completing the code to correctly label the input for accessibility.
<label for=[1]>Name:</label> <input type="text" id="name" name="name">
The for attribute in the label must match the id of the input it labels. Here, both should be "name".
Fill both blanks to create a button that is disabled and has an accessible label.
<button type=[1] disabled=[2] aria-label="Submit form">Send</button>
The button type should be "submit" to send form data. The disabled attribute is set to true to disable the button. The aria-label helps screen readers understand the button's purpose.
Fill all three blanks to create an input with a placeholder, required attribute, and a descriptive aria-label.
<input type=[1] placeholder=[2] required=[3] aria-label="Enter your email address">
The input type should be "email" to validate email addresses. The placeholder shows example text inside the input. The required attribute set to true makes the field mandatory. The aria-label describes the input for screen readers.