HTML images are defined with the <img> tag. The source file (src), alternative text (alt), and size (width and height) are provided as attributes to the <img> tag.
HTML file: | Displayed by browser: |
---|---|
<!DOCTYPE html>
<html> <body> <img src="images/w3schools.jpg" alt=" text" width="104" height="142"> </body> </html> |
![]() |
No nitty-gritties about the attributes yet... but this is how every image should be marked up in an HTML document.