Image tag:
To insert an image into the page, we need to use the "img" tag, whose attribute is "src"
For example code:
Conclusion:
Here we assume that the image file and the html file are in the same directory.
Similarly we can give the full path to the image file.
Example:
Width and Height:
Correct the size of the image displayed in the web page by using the width and height in the attributes.
Example code:
Conclusion:
Alignment:
We can use "align" in the attribute to align the image.
Set the attribute value to: left/right/center
For example code:
Conclusion:
Border :
We can use "border" in the properties to set the border around the image. This can be used to create space around the image.
Example code:
Conclusion:
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn