Jump to content

Links: Difference between revisions

104 bytes added ,  11 years ago
Line 31: Line 31:
Creating hypertext with HTML can be done with a simple code. The HTML link syntax looks like this: <a href="url">Link text</a>  
Creating hypertext with HTML can be done with a simple code. The HTML link syntax looks like this: <a href="url">Link text</a>  


Example: To link to a page about linking, I would use this code <nowiki><a href="http://www.w3schools.com/html/html_links.asp#gsc.tab=0">Links</a></nowiki>. It would then appear as: [http://www.w3schools.com/html/html_links.asp#gsc.tab=0 Links]. This HTML code will work on websites that support HTML coding. It's important to remember that various websites will have their own method of adding hypertext to a post. For example, this wiki does not use the HTML code shown above. Instead, hypertext is shown by placing a url in standard brackets and then simply typing the word you wish to display. It looks like this: <nowiki>[http://www.wikipedia.org Wikipedia]</nowiki> and displays as this: [http://www.wikipedia.org Wikipedia].
Example: To link to a page about linking, I would use this code <nowiki><a href="http://www.w3schools.com/html/html_links.asp#gsc.tab=0">Links</a></nowiki>. It would then appear as: [http://www.w3schools.com/html/html_links.asp#gsc.tab=0 Links]. This HTML code will work on websites that support HTML coding. It's important to remember that various websites will have their own method of adding a hyperlink to a post. For example, this wiki does not use the HTML code shown above. Instead, hyperlinks are shown by placing a url in standard brackets and then simply typing the word you wish to display. It looks like this: <nowiki>[http://www.wikipedia.org Wikipedia]</nowiki> and displays as this: [http://www.wikipedia.org Wikipedia]. When working with various websites, take the time to figure out how each site supports hyperlinks.  


Sometimes it's beneficial to have hyperlinks open a new tab or window. The HTML code for opening the link in another tab looks like this: <nowiki><a href="URL of target site" target="_blank">Anchor text</a></nowiki> and displays as this: [http://www.w3schools.com/html/html_links.asp Anchor text].  
Sometimes it's beneficial to have hyperlinks open a new tab or window. The HTML code for opening the link in another tab looks like this: <nowiki><a href="URL of target site" target="_blank">Anchor text</a></nowiki> and displays as this: [http://www.w3schools.com/html/html_links.asp Anchor text].  
twitter
261

edits