HTML basic tutorial image markup
Picture tag
Note: This is a one-sided tag
In the web page, pictures can be seen everywhere
Basically every webpage has pictures
Next, let’s use the tag to add pictures to our own webpages
Syntax format:
Common attributes
Width: Image width
Height: Image height
Border: Picture border thickness.
Src: The path of the picture (relative path)
Align: The horizontal alignment of the picture, values: left, center, right
Hspace: The distance between the picture and the left and right text (horizontal distance)
Vspace: The distance between the picture and the contextual text (vertical distance) ).
Notes
If you want to scale the image proportionally , only need to specify either width or height.
The Align property can only center the text, not the image alone.
Align can achieve the effect of "mixed graphics and text". align = “left | right”
Let’s take a look at an example:
Life was like a box of chocolates, you never know what you're gonna get.(生命就像一盒巧克力,结果往往出人意料。)---《阿甘正传》
Note: You can try to enter other attributes to see Effect, if you want to center the image, you can only use CSS. We will introduce it later