Prashanth.P Posted March 2, 2021 Share Posted March 2, 2021 (edited) 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 March 2, 2021 by Prashanth.P spelling mistake Link to comment Share on other sites More sharing options...
shaili_shah Posted March 5, 2021 Share Posted March 5, 2021 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. 1 Link to comment Share on other sites More sharing options...
Prashanth.P Posted March 5, 2021 Author Share Posted March 5, 2021 I'm almost satisfied with your answer But what about these 3 attributes alt="W3Schools.com" width="104" height="142"> How can I use this Link to comment Share on other sites More sharing options...
dsonesuk Posted March 5, 2021 Share Posted March 5, 2021 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. 1 Link to comment Share on other sites More sharing options...
shaili_shah Posted March 5, 2021 Share Posted March 5, 2021 "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. 1 Link to comment Share on other sites More sharing options...
dsonesuk Posted March 5, 2021 Share Posted March 5, 2021 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. 1 Link to comment Share on other sites More sharing options...
dsonesuk Posted March 5, 2021 Share Posted March 5, 2021 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. 1 Link to comment Share on other sites More sharing options...
dsonesuk Posted March 5, 2021 Share Posted March 5, 2021 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. 1 Link to comment Share on other sites More sharing options...
Prashanth.P Posted March 6, 2021 Author Share Posted March 6, 2021 (edited) Thank you for your valueble reply Edited March 6, 2021 by Prashanth.P Link to comment Share on other sites More sharing options...
Joshua Swafford Posted March 22, 2021 Share Posted March 22, 2021 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 comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now