HTML CSS Reference/HTML Attributes Reference/href

Материал из Web эксперт
Перейти к: навигация, поиск

"href" Example

    
<HTML>
<head><Title>Example For href</Title></head>
<BODY>
<a href="#jumpto">Scroll down to the bottom paragraph</a>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<p id="jumpto">This is the last paragraph on the page</p>
</BODY>
</HTML>



href is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |<a>                             <area>                        |
|                |<base>                          <link> (not NN4)              |
+----------------+--------------------------------------------------------------+



href Possible Values

Possible Values
URL              Specifies the location of the requested file.
#name            Specifies the target anchor "#name".
Filename         Specifies the name of a file in a network or local hard drive.
Other protocols  You can use any of the following protocols in your href value:
                
                 afs://      AFS file access. 
                 cid://      Content identifiers for MIME body part.
                 file://     Specifies the address of a file from the locally accessible drive.
                 ftp://      Uses Internet File Transfer Protocol (FTP) to retrieve a file.
                 http://     The most commonly used access method. 
                 https://    Provide some level of security of transmission 
                 mailto://   Opens an email program.
                 mid://      The message identifier for email.
                 news://     Usenet newsgroup.
                 x-exec://   Executable program.



"href" Syntax and Note

Note:
    
The href attribute sets URL or anchor point of the 
<a>, <area>, <base>, and <link> elements.
    
Syntax:
    
<element href="value"> . . . </element>