img src attribute
The src attribute on the img element:
Examples
<img | attribute | = | "value(s)" | > | Examples | ||
---|---|---|---|---|---|---|---|
7. | src | = | URL | <src="images/puppy.jpg" alt="a grey puppy in the middle of a room"> (relative path) <src="http://www.domaine. |
Video demonstration img src attribute
HTML5 img src attribute Tutorial
min | video details |
---|---|
00:02 | src attribute on img: video tutorial |
00:08 | the src attribute represents the source of the image you want to embed into your page = the path of the image this attribute is required !! |
00:21 | in this case the value of the src attribute WHICH REPRESENTS THE PATH corresponds with the name of the image because both the html file (index.php) and the image are located in the same place = on desktop |
00:32 | the path of the image is correct → the image has been successfully embedded into our html page |
00:40 | moving the image from desktop to a folder called "images" without changing the path of the image in our code |
01:49 | the image does not display because the path is not correct: src="sky.jpg" instead of src="images/sky.jpg" |
01:59 | the path is correct → the image is displayed again |