Step-by-Step learning of html-Lesson 4

Source: Internet
Author: User

In this lesson, we will mainly explain the link: this can also be defined as a hypertext link, while the label is <a>
The full name of this label is anchor, which means anchor in Chinese;
Example: <a href = "http://www.baidu.com"> click! </A>
A link appears on the webpage. The text format is the click in the middle of the positive and negative labels !;
Process: click it! When the web server is located on the internet, the Baidu website will be displayed in the web browser, as if you entered the address manually. here you need to add: internet addresses are also called Uniform Resource positioning characters, which are frequently seen URLs;
When a linked webpage is opened in a new browser window, you can directly add a property value: target = "_ blank" to the link so that it can be opened in the new window, however, this attribute is not allowed by W3C, so an error is usually reported during verification. This must be noted.
Today, there are few things to talk about, mainly the links that come and go. The jump between pages also comes from the use of links. This allows you to study the link tags by yourself.
Next, let's take the exercise class:
1. When you were in elementary school, a good friend found you through the Internet and told you that he wanted to exchange a home page link with you. How do you add a link to his webpage www.cheapsuits.com /~ Billybob /?
Is this question difficult? Not hard! In fact, there are living examples above, so all you need to do is write the following line of code to flat everything:
<A href = "http://www.cheapsuits.com /~ Billybob/"> friend homepage </a>
In this way, you can.
2. When you publish a webpage to the Internet, the homepage will be placed at http://www.mysite.com/home.html. Compile HTML code on this page. When a visitor clicks All about me, the page http://www.mysite.com/mylife.html is displayed.
This is a link problem:
<A href = "http://www.mysite.com/mylift.html"> All about me </a>
At the same time, this All about me should be placed on the page of the home page to ensure that after clicking it, we will get the desired result.
3. You plan to release a CD containing HTML. How to create a link to the \ guide \ maine \ katahdin.html page on a page in the \ guide directory.
This is the server problem. We only need to perform that process:
<A href = "maine \ katahdin.html"> mount katahdin </a>;
4. How to create a link to the \ guide \ arizona \ superstitions.html page in \ guide \ maine \ katahdin.html?
This example is not difficult. It is still a link problem because it is all under a large Directory guide, so you only need to create a relative path:
<A href = "../arizona/superstitions.html"> the superstition range </a>
In this way, you can.


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: info-contact@alibabacloud.com 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.