Computer Science, asked by sharmanirbhay2008, 12 hours ago

Write an HTML document, which is making an image as a hyperlink to another document, which contains enlarged part of the same image.​

Answers

Answered by BrainlySrijanll
4

Answer:

You can achieve this in two way.

Using only HTML

Using HTML + JavaScript

Since you asking for the HTML solution, I’ll explain the first (pure HTML) solution.

If I’m not wrong, “hyperlink to another document” means you have another HTML file containing the enlarged image. So, what you have to do is just wrap the <img/> tag with <a> tag and link that tag with your second HTML page which contains the enlarged image.

In your first HTML page,

<a href="enlarged_image.html">

<img src="small_image.png" alt="My Small Image" />

</a>

I suppose your second HTML page (enlarged_image.html) looks like this:-

  1. <div>
  2. <img src="large_image.png" alt="My Large Image" />
  3. </div>
Answered by imageniuss
1

You can achieve this in two way.

Using only HTML

Using HTML + JavaScript

Since you asking for the HTML solution, I’ll explain the first (pure HTML) solution.

If I’m not wrong, “hyperlink to another document” means you have another HTML file containing the enlarged image. So, what you have to do is just wrap the <img/> tag with <a> tag and link that tag with your second HTML page which contains the enlarged image.

In your first HTML page,

<a href="enlarged_image.html">

<img src="small_image.png" alt="My Small Image" />

</a>

I suppose your second HTML page (enlarged_image.html) looks like this:-

  1. <div>
  2. <img src="large_image.png" alt="My Large Image" />
  3. </div>
Similar questions