HOME | basics of HTML | basics of PHP | neobux | onbux | readbud | templates |
| |||||||||||
LinksLinks are found in nearly all Web pages. Links allow users to click their way from page to page. Try it Yourself - Examples
HTML links (You can find more examples at the bottom of this page) HTML Hyperlinks (Links)A hyperlink (or link) is a word, group of words, or image that you can click on to jump to a new document or a new section within the current document. When you move the cursor over a link in a Web page, the arrow will turn into a little hand. Links are specified in HTML using the <a> tag. The <a> tag can be used in two ways:
HTML Link SyntaxThe HTML code for a link is simple. It looks like this:
The href attribute specifies the destination of a link. Example
which will display like this: Visit W3Schools Clicking on this hyperlink will send the user to W3Schools' homepage. Tip: The "Link text" doesn't have to be text. You can link from an image or any other HTML element. HTML Links - The target AttributeThe target attribute specifies where to open the linked document. The example below will open the linked document in a new browser window or a new tab:
HTML Links - The name AttributeThe name attribute specifies the name of an anchor. Note: Bookmarks are not displayed in any special way. They are invisible to the reader. ExampleA named anchor inside an HTML document:
Create a link to the "Useful Tips Section" inside the same document:
Or, create a link to the "Useful Tips Section" from another page:
Basic Notes - Useful TipsNote: Always add a trailing slash to subfolder references. If you link like this: href="http://www.w3schools.com/html", you will generate two requests to the server, the server will first add a slash to the address, and then create a new request like this: href="http://www.w3schools.com/html/". Tip: Named anchors are often used to create "table of contents" at the beginning of a large document. Each chapter within the document is given a named anchor, and links to each of these anchors are put at the top of the document. Tip: If a browser does not find the named anchor specified, it goes to the top of the document. No error occurs. More ExamplesAn image as a link
Link to a location on the
same page Break out of a frame Create a mailto link Create a mailto link 2 HTML Link Tags
|
|||||||||||
© 2011 d4download.orgfree, All Rights Reserved.
Design created by diljith d4download.orgfree.com veriosn 2.0
HOME | basics of HTML | basics of PHP | neobux | onbux | readbud | templates |