HTML knowledge point summary <a> tag and html knowledge point summary tag
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> 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.