Image tag () and source attribute (Src)
## In HTML, images are defined by the tag.
Images can be displayed in a document by using the tag.
is an empty tag, which means that it only contains attributes and has no closing tag. (Recommended learning:HTML Getting Started Tutorial)
To display images on the page, you need to use the source attribute (src). src refers to "source". The value of the source attribute is the URL address of the image.
The syntax for defining an image is:
<img src="url" />
Replacement text attribute (Alt)
The alt attribute is used to define a string of prepared replaceable text for the image. The value of the replacement text attribute is user-defined.<img src="boat.gif" alt="Big Boat">
Basic Notes - Helpful Tips:
If an HTML file contains ten images, then in order to display the page correctly, 11 files need to be loaded. Loading images takes time, so our advice is: use images with caution.The above is the detailed content of The HTML image tag is. For more information, please follow other related articles on the PHP Chinese website!