Computer Science, asked by nayansukh2011, 10 months ago

How are images added in an HTML document? What are the different attributes of an image element​

Answers

Answered by Natsukαshii
44

Inserting Images into Web Pages

Images enhance visual appearance of the web pages by making them more interesting and colorful.

The <img> tag is used to insert images in the HTML documents. It is an empty element and contains attributes only. The syntax of the <img> tag can be given with:

<img src="url" alt="some_text">

The following example inserts three images on the web page:

ExampleTry this code »

<img src="kites.jpg" alt="Flying Kites">

<img src="sky.jpg" alt="Cloudy Sky">

<img src="balloons.jpg" alt="Balloons"><img src="kites.jpg" alt="Flying Kites">

Each image must carry at least two attributes: the src attribute, and an alt attribute.

The src attribute tells the browser where to find the image. Its value is the URL of the image file.

Whereas, the alt attribute provides an alternative text for the image, if it is unavailable or cannot be displayed for some reason. Its value should be a meaningful substitute for the image.

mark it as brainiest answer

please,please,please,please,please

i will follow you

Answered by monupawar85
9

The web is not just about text, its multi-media and HTML's multimedia features allow you to include images, audio clips, video clips, and other multimedia element in the web pages.

The <img> tag is used to insert images in HTML documents. It is an empty element and contains attributes only. The syntax of<img> tag can be given with:

<img src="url" alt="some_text">

The following example inserts three images on the web page:

Example

Try this code »

<img src="kites.jpg" alt="Flying Kites"><img src="sky.jpg" alt="Cloudy Sky"><img src="balloons.jpg" alt="Hot Air Balloons">

Note: Like <br> , the <img> element is also an empty element, and does not have a closing tag. In XHTML it closes itself ending with "/>".

Read more on Brainly.in - https://brainly.in/question/7985793#readmore

Similar questions