Jump to content

Recommended Posts

Namasthe I'm recent learner to this site. How to write a HTML image code on notepad. I can't write the code in notepad even in tryit editor. w3schools displayed options are not working only for w3schools site image working. Please guide me in this <img> tag. Thank You.

Edited by Prashanth.P
spelling mistake
Link to post
Share on other sites
  • Prashanth.P changed the title to writing code html image. about <img> tag

It's working in notepad.

<html>
<head>
</head>
<body>
<img src="http://qnimate.com/wp-content/uploads/2014/03/images2.jpg"/>
</body>
</html>

If there is still problem then use the latest version of notepad.

Hope it helps.

  • Like 1
Link to post
Share on other sites

Alt shows the ALTernative text if image failt to load. The width and height as they suggest allows you add these dimensions in 'px', most of the time this is controlled by css, but these can help set the size beforehand and prevent layout jumping as images fill there occupying locations.

  • Like 1
Link to post
Share on other sites

"Width" and "Height" are used for the width and height of the image.

Whereas "alt" is used when there is no image displayed on the page.

Means if there is a wrong source of image is given then text in the alt will display.

  • Like 1
Link to post
Share on other sites
5 hours ago, dsonesuk said:

Alt shows the ALTernative text if image failt to load. The width and height as they suggest allows you add these dimensions in 'px', most of the time this is controlled by css, but these can help set the size beforehand and prevent layout jumping as images fill there occupying locations.

 

  • Like 1
Link to post
Share on other sites
5 hours ago, dsonesuk said:

Alt shows the ALTernative text if image failt to load. The width and height as they suggest allows you add these dimensions in 'px', most of the time this is controlled by css, but these can help set the size beforehand and prevent layout jumping as images fill there occupying locations.

 

  • Like 1
Link to post
Share on other sites
5 hours ago, dsonesuk said:

Alt shows the ALTernative text if image failt to load. The width and height as they suggest allows you add these dimensions in 'px', most of the time this is controlled by css, but these can help set the size beforehand and prevent layout jumping as images fill there occupying locations.

 

  • Like 1
Link to post
Share on other sites
  • 3 weeks later...
On 3/2/2021 at 8:11 AM, Prashanth.P said:

Namasthe I'm recent learner to this site. How to write a HTML image code on notepad. I can't write the code in notepad even in tryit editor. w3schools displayed options are not working only for w3schools site image working. Please guide me in this <img> tag. Thank You.

You should really really not use notepad. I started with it and it just sucks. You may want to switch to either Atom or Visual Code.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...