Difference between revisions of "A (HTML element)"
From Wiki @ Karl Jones dot com
Karl Jones (Talk | contribs) (→Link to a Microsoft Word document) |
Karl Jones (Talk | contribs) (→Link to a Microsoft Word document) |
||
Line 5: | Line 5: | ||
=== Link to a Microsoft Word document === | === Link to a Microsoft Word document === | ||
− | Link to a | + | Link to a Microsoft Word document by setting the link's [[href attribute (HTML)]] to the name of the Word document: |
<a href="filename.docx">Download Word document</a> | <a href="filename.docx">Download Word document</a> |
Revision as of 18:38, 20 April 2016
In HTML, a (for "anchor") represents a hyperlink.
Examples
Link to a Microsoft Word document
Link to a Microsoft Word document by setting the link's href attribute (HTML) to the name of the Word document:
<a href="filename.docx">Download Word document</a>
In this example, the Word document is in the same folder as the web page containing the link.
If the Word document is located elsewhere, modify the href attribute to specify the path to the document:
<a href="../documents/filename.docx">Download Word document</a>
See also
External links
- a element @ W3.org
- Links @ W3.org
- Fragment identifiers @ W3.org
- HTML a tag @ W3schools.com
- HTML a href attribute @ W3schools.com
- Hyperlink @ Wikipedia
- Inline linking @ Wikipedia