Difference between revisions of "A (HTML element)"

From Wiki @ Karl Jones dot com
Jump to: navigation, search
(Examples)
(Full-qualified URL)
Line 7: Line 7:
 
Use a fully-qualified URL when linking to another website.
 
Use a fully-qualified URL when linking to another website.
  
  <nowiki><a href="http://wikipedia.org">Wikiedia</a></nowiki>
+
  <nowiki><a href="http://wikipedia.org">Wikipedia</a></nowiki>
  
 
=== Link to a Microsoft Word document ===
 
=== Link to a Microsoft Word document ===

Revision as of 19:05, 20 April 2016

In HTML, a (for "anchor") represents a hyperlink.

Examples

Full-qualified URL

Use a fully-qualified URL when linking to another website.

<a href="http://wikipedia.org">Wikipedia</a>

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