Step by step learning html-Lesson 3

Source: Internet
Author: User

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"
<Html xmlns = "">
<Title> NBA Player-Houston </title>
<H1> Yao Ming <P>
NickName: Yao <br/>
Position: Center <br/>
Height: 216 <br/>
Weight: 156 <br/>
Age: 28 <br/>
BirthPlace: Shanghai China
NickName: Air YI <br/>
Position: Formater <br/>
Height: 208 <br/>
Weight: 120 <br/>
Age: 24 <br/>
BirthPlace: Guangdong China
After writing in the web page, we want to do is to verify the web page: 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"

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.