HTML Tutorial for Beginners(2022) - Image Height and Width Attributes in HTML

HTML Tutorial for Beginners(2022) - Image Height and Width Attributes in HTML

Assessment

Interactive Video

Information Technology (IT), Architecture

University

Hard

Created by

Quizizz Content

FREE Resource

This video tutorial explains how to use the IMG tag in HTML to add images to a webpage. It covers setting the height and width attributes to control image dimensions and emphasizes the importance of including alt text for accessibility and SEO. The tutorial includes a practical example of creating an HTML file, adding an image, and adjusting its size. The video concludes with a demonstration of running the HTML file in a browser and modifying the image width.

Read more

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the primary purpose of the height and width attributes in an HTML image tag?

To set the dimensions of the image

To change the image format

To add a border to the image

To link the image to another page

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which HTML tag is used to add an image to a webpage?

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In the example provided, what is the initial height set for the image?

100

400

200

300

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Why is it important to include an alt attribute in an image tag?

It helps in SEO and accessibility

It changes the image color

It adds a caption to the image

It links the image to a video

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens when you refresh the browser after changing the image width from 300 to 400?

The image width increases

The image rotates

The image height decreases

The image disappears