What is the correct way to add alternative text to an image in HTML to ensure accessibility?
Choose 1 answer
Question 2 of 20
Which of the following code snippets correctly creates a link that opens in a new tab?
Choose 1 answer
Question 3 of 20
What will happen if you create an image link using the following code?
```html
<a href='#'><img src='logo.png' alt='Logo'>n</a>
```
Choose 1 answer
Question 4 of 20
In the following scenario, how can you ensure that the image maintains its aspect ratio while scaling to 100% of the browser width?
```html
<img src='example.jpg' width='100%'>
```
Choose 1 answer
Question 5 of 20
Consider the following HTML code:
```html
<a href='mailto:support@example.com'>Contact Us</a>
```
What will happen when the user clicks on this link?
Choose 1 answer
Question 6 of 20
What is the correct way to make an image act as an email link in HTML?
```html
n<!-- Fill in the blanks -->
<a href='_______'><img src='email-icon.png' alt='Email Us'></a>
```
Choose 1 answer
Question 7 of 20
You want to display an image only if it exists. If the image is not found, nothing should appear. What is the correct HTML and CSS combination to achieve this?
```html
<img src='non-existent.jpg' alt=''>
```
Which CSS rule should be applied?
Choose 1 answer
Question 8 of 20
Given the following HTML code, what is the result?
```html
<a href='#section2'>Go to Section 2</a>
n<div id='section2'>This is Section 2n</div>
```
Choose 1 answer
Question 9 of 20
What will be the result of the following code?
```html
<a href='https://example.com' title='Visit Example'>Example</a>
```
Choose 1 answer
Question 10 of 20
Which of the following is the correct syntax for adding a favicon to an HTML page?
Choose 1 answer
Question 11 of 20
What is the outcome of the following code?
```html
<a href='image.jpg'>Click here to view the image</a>
```
Choose 1 answer
Question 12 of 20
What is the purpose of the 'target="_blank"' attribute in the following link?
```html
<a href='https://example.com' target='_blank'>Visit Example</a>
```
Choose 1 answer
Question 13 of 20
What does the 'rel="noopener noreferrer"' attribute pair in the following link do?
```html
<a href='https://example.com' target='_blank' rel='noopener noreferrer'>Visit Example</a>
```
Choose 1 answer
Question 14 of 20
What will happen when this code is executed?
```html
<a href='mailto:?subject=Hello&body=This%20is%20a%20message'>Send Email</a>
```
Choose 1 answer
Question 15 of 20
How can you ensure that the following image does not break if the image path is incorrect?
```html
<img src='image.jpg' alt='Alternative Text'>
```
Choose 1 answer
Question 16 of 20
What will happen when the following code is used?
```html
<a href='data:image/png;base64,...'>Download Image</a>
```
Choose 1 answer
Question 17 of 20
Which of the following is the correct way to preload an image in HTML?
Choose 1 answer
Question 18 of 20
What is the correct HTML syntax for linking to a file download?
Choose 1 answer
Question 19 of 20
What is the outcome when this code is executed?
```html
<a href='https://example.com/image.jpg' download='newimage.jpg'>Download Image</a>
```
Choose 1 answer
Question 20 of 20
Consider the following code snippet:
```html
<img src='logo.png' alt='Company Logo' width='300' height='200'>
```
What is the purpose of including the width and height attributes?