Home > Web Front-end > HTML Tutorial > HTML tutorial: Introduction to modifying image size, alignment, spacing, and border attributes_HTML/Xhtml_Web page production

HTML tutorial: Introduction to modifying image size, alignment, spacing, and border attributes_HTML/Xhtml_Web page production

WBOY
Release: 2016-05-16 16:40:37
Original
1852 people have browsed it
Image tag:HTML tutorial: Introduction to modifying image size, alignment, spacing, and border attributes_HTML/Xhtml_Web page production
To insert an image into the page, we need to use the "img" tag, whose attribute is "src"
For example code:
HTML tutorial: Introduction to modifying image size, alignment, spacing, and border attributes_HTML/Xhtml_Web page production
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:
HTML tutorial: Introduction to modifying image size, alignment, spacing, and border attributes_HTML/Xhtml_Web page production
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:
HTML tutorial: Introduction to modifying image size, alignment, spacing, and border attributes_HTML/Xhtml_Web page production
Conclusion:


Alignment:
We can use "align" in the attribute to align the image.
Set the attribute value to: left/right/center
For example code:
HTML tutorial: Introduction to modifying image size, alignment, spacing, and border attributes_HTML/Xhtml_Web page production HTML tutorial: Introduction to modifying image size, alignment, spacing, and border attributes_HTML/Xhtml_Web page production
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:
HTML tutorial: Introduction to modifying image size, alignment, spacing, and border attributes_HTML/Xhtml_Web page production
Conclusion:
HTML tutorial: Introduction to modifying image size, alignment, spacing, and border attributes_HTML/Xhtml_Web page production
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template