Computer Science, asked by george0096, 3 months ago

1. How are images added in an HTML document? What are the different attributes of an image element?
2. How can you link web-pages in HTML? What are the different types of linking?
3. Explain with the help of còde, how audio clips can be added in an HTML document.

Answers

Answered by emma3006
5

1.  The <img> tag is used to add images in an HTML web page. it is an empty tag and requires different attributes to be specified with it. these attributes for the <img> tag tell the browser how to lay out the page so that the text can flow properly around the image.

Attributes of the <img> tag are:

  • src - To add and define the source of an image on a web page, the src attribute is used.

        Syntax - <img src = "Address or path of the image file">

  • height - The height attribute specifies the height of an image either in the form of an integer or a percentage value.

        Syntax - <img src = "imag1.jpg" height = "integer or percentage value">

  • width - The width attribute specifies the width of an image either in the form of an integer or a percentage value.

        Syntax - <img src = "imag1.jpg" width = "integer or percentage value">

  • align - To specify the alignment of the image, align attribute is used. however, the align attribute is not supported in HTML5.

         Syntax - <img src = "imag1.jpg" align = "value">

  • alt - The alt attribute displays text as an alternative to the image. It is generally used in the case the user has a text-based browser on his computer, such as Lynx.

        Syntax - <img src = "imag1.jpg" alt = "alternative text">

2.  The chief power of HTML comes from its ability to link text and/or an image to another document or section of a document. A browser highlights the identified text or image with color and/or underlines to indicate that it is a hypertext link (or just link). A link in HTML is defined using the <A> or anchor tag.

Linking in HTML can be done in two ways:

  • External linking - The external linking links two documents i.e., upon clicking a hyperlink, a new document, to which the hyperlink is linked, gets opened.
  • Internal linking - The internal linking links various sections of same document. That is, upon clicking a hyperlink, a different section of the same document becomes visible in the browser window.

3.  <AUDIO> tag specifies a standard way to insert an audio file in a web page. It can be used for any file format like, .mp3, .ogg, .wav, etc.

The following example the use of <audio> tag:

<html>

<head>

<title> Adding audio clips </title>

</head>

<body>

<audio src = " Kalimba.mp3">

Your browser does not support audio file.

</audio>

</body>

</html>

Answered by Anonymous
0

GeorgeNotFound? Dream smp?

Similar questions