We also involved in the HTML of some things, next we want to relate to the image, if there is no image, even if the style of the text is more complex, after all, is still monotonous, we need to use the image to add more forms of expression to our page.
Picture ******************
1. We use the tag to import an image to our HTML file, which is an empty tag, that is, it contains only attributes, and it does not have a corresponding closed tag, that is, it does not appear in pairs.
2. Its src attribute is applied to the specified source property address, it can be an absolute path, or a relative path, or it can be a URL, a URL, for example, we want to introduce a picture of Baidu is a picture, then you can write the following code:
<src= "http://f.hiphotos.baidu.com/baike/c0%3Dbaike80%2C5%2C5%2C80%2C26/sign= E8f89e86b0fb43160e12722841cd2d46/ca1349540923dd5483db5925d309b3de9d8248d7.jpg ">
3. Of course the above code is a bit long, mainly Baidu's address is relatively long, this picture, if you are curious, you can go to their own browser to run a bit.
The 4.img tag can also include the ALT attribute, which is used to display when a picture cannot be loaded.
The 5.img tag also has a width property to set the height of the display image by setting the thickness of the displayed picture.
6. If a label has multiple properties, it needs to be separated by a space, and the value of the attribute needs to be enclosed in double quotation marks to explicitly represent its properties.
7. Sample code:
<src= "Xinxing.gif" alt= "Sinsing" width= " Height = "The " />
Path Problem **************
1. I will think of some of my experience in HTML, here to remind you about the path of the problem, the img tag src attribute can be used absolute path, also can use relative path.
2. For example, we write the HTML and the picture in the same directory, and the picture is called X.gif, then you can write code:
Summary **************
1. In this lesson we introduce some of the knowledge of HTML in the picture, I hope you can understand.
2. But in real projects, adding the right picture is often a more time-consuming task, and we often have to do a variety of transduction, which we'll say later.