Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9136983
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:01:49+00:00 2026-06-17T09:01:49+00:00

I’m getting stated with HTML5. When I load images onto a browser, i can

  • 0

I’m getting stated with HTML5.

When I load images onto a browser, i can use normal HTML <img> tag, and in HTML5, I can also use – canvas- drawImage().

I don’t known what is the differences between <img> and drawImage() when load webpages in browser.

Anyone can make me clear???

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T09:01:50+00:00Added an answer on June 17, 2026 at 9:01 am

    The <img> tag takes an image source and places it in your DOM. The DOM element can then be selected from your document object model with JavaScript and it can be modified (attributes can be added or removed, source can be changed, etc.)

    drawImage() takes pixel data and visualizes it in a <canvas> element. Afterwards only the canvas element can be interacted with (selected with javascript). The pixel data can be modified but you cannot utilize attributes like title, alt, etc. out of the box like you could with the <img> tag.

    Use the <img> tag if you would like simply to render images inside your web page. Use the <canvas> if you want to interact with the images after they have been rendered and you want to perform modifications to the pixel data (for example to draw on top of the image).

    Example:

    <img>:

    <!-- When hovered it would display a tooltip saying "This is an image" -->
    <img id="test" src="some/src.png" alt="error" title="This is an image" />
    <!-- The image will fit precisely in it's container -->
    

    Canvas:

    // In this example if the canvas dimensions are larger/smaller
    // than the image dimensions, the image will be clipped or
    // it would not fill the entire space
    var c = document.getElementById("myCanvas");
    var ctx = c.getContext("2d");
    var img = document.getElementById("test");
    ctx.drawImage(img, 0, 0); // On hover nothing will show
    // unless you implement a custom tooltip functionality
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want use html5's new tag to play a wav file (currently only supported
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I am trying to understand how to use SyndicationItem to display feed which is
I have a jquery bug and I've been looking for hours now, I can't
I am confused How to use looping for Json response Array in another Array.
I am using JSon response to parse title,date content and thumbnail images and place
I have this code to decode numeric html entities to the UTF8 equivalent character.
In my XML file chapters tag has more chapter tag.i need to display chapters

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.