Summary of HTML knowledge points & lt; a & gt; tag and html knowledge point summary tag

Source: Internet
Author: User

HTML knowledge point summary <a> tag and html knowledge point summary tag

  • What is HTML?

HTML (Hyper Text Markup Language) is a Language used to describe web pages. Hyper Text means that a webpage contains not only text, but also images, links, videos, audios, and other non-text elements. A markup language is a set of tags used to describe webpages in HTML. HTML documents are also called Web pages

  • <A> element

<A> an element is also called an html anchor element. a hyperlink can be a word, a word, a group of words, or an image, you can click the content to jump to a new document or a part of the current document.

There are two ways to use the <a> label:

  • <A> common attributes of Elements

The href attribute specifies the target of the link. Includes the following types:

(1) Link: <a href = "http://www.baidu.com"> Baidu </a>

 

(2): <a href = "DBSCAN.zip"> File Download </a>

 

(3) anchor

 

Do not leave the href attribute blank. If you do not need to write an address for the moment, write # Or javascript :;. If href is left blank, the page is refreshed.

  • Differences between href and src

Href (hypertext reference) refers to hypertext reference, indicating that the current page references content elsewhere.

Src (source) indicates the source address, indicating to introduce content elsewhere to the current page.

Therefore, src should be used for , <script>, and <iframe>, while href should be used for <a> and <map>.

2. target attributes

Target specifies where to open the page specified by the link. target has five attribute values:

(1) _ self: default. Open the linked document in the current framework.

(2) _ blank: Open the linked document in a new window.

(3) _ parent: Open the linked document in the parent framework set.

(4) _ top: Open the linked document throughout the window.

(5) framename: Open the linked document in the specified framework.

 

(3) download (HTML5): Specifies the name of the downloaded file.

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.