After learning the previous two lessons, I don't know if you have a certain degree of understanding about what html is. Today's third lesson is a summary of the first stage, and I will add some new content, however, we will make a summary. Well, we will not talk nonsense. Please go to today's course!
On the basis of the previous two lessons, this lesson mainly includes the question of inserting images. The code for inserting images is as follows:
Img label: Indicates inserting an image. src: it is simply a short form of source. To put it bluntly, it is a resource, so the image to be inserted is followed by the resource, alt is a very important attribute value. What it contains refers to the replacement of text when the image cannot be normally displayed, sometimes, if the webpage load is slow, we can see that the originally displayed page shows the value we have determined in the alt attribute.
In addition, the img tag does not need to end with a </img> label, but only needs to add a backslash to the end of the img.
Also, here we use relative paths for image paths. Because I put images and webpage files in a folder, it is easier to write paths. You can try it on your own!
The specific code is as follows:
<! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.1 // EN"
Http://www.w3.org/TR/xhtml11//DTD/xhtml11.dtd>
<Html xmlns = "http://www.w3.org/1999/xhtml">
<Head>
<Title> NBA Player-Houston </title>
</Head>
<Body>
<H1> Yao Ming <P>
<br/>
NickName: Yao <br/>
Position: Center <br/>
Height: 216 <br/>
Weight: 156 <br/>
Age: 28 <br/>
BirthPlace: Shanghai China
</P>
<Hr/>
<P>
<br/>
NickName: Air YI <br/>
Position: Formater <br/>
Height: 208 <br/>
Weight: 120 <br/>
Age: 24 <br/>
BirthPlace: Guangdong China
</P>
</Body>
</Html>
After writing in the web page, we want to do is to verify the web page: http://validator.w3.org is the Web site, because in most cases our web page is not online, therefore, we select the validator by file uploads option to select the webpage file to be verified, and then it will give an error message and the like. If there are no errors or warnings, your code is well written.
Next, let's summarize what we learned in the first three lessons:
1. Which four tags must be included in all html pages: html, head, title, and body;
2. Separate use of branch and separator hr and br;
3. Insert tags of images, such as img;
The first phase of learning is just now. Next we will begin to learn more beautiful and more powerful html. Let's cheer up!
Author: "Li Yuan Cao"