src image html code example

Example 1: html how to add an image

<img src="flowers.jpg" alt="flowers">

//Always add the image type (jpg,png, etc) Adding alt text
is also good coding practice :)

Example 2: html img src

<img href="https://website.com/image.jpg"> 
<!-- for an image online -->

<img src=C:\your_files>
<!-- for a local file -->

Example 3: images in html

<html>
  <head>
  </head>
	<body>
  <img src="exampel.end">
    </img>
  </body>
  
  
  </html>

Example 4: images in html

<img src="image.jps">
//image.jpg is where you would put the inage source.

Example 5: html how to insert image

<!--When the image is in the same folder as your html file-->
<img src="example.jpg">
<!--When the image is in a image folder-->
<img src="./image/example.jpg">

Example 6: img src html

<img src="https://source.unsplash.com/user/c_v_r" alt="Unsplash" alt="This is the alt" height="42" width="42">

Tags:

Css Example