Display link code in html page

This is a discussion on "Display link code in html page" within the Web Page Design section. This forum, and the thread "Display link code in html page are both part of the Design Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Oct 8th, 2007, 10:35
SuperMember

SuperMember
Join Date: Apr 2007
Location: Sydney
Posts: 159
Thanks: 0
Thanked 0 Times in 0 Posts
Display link code in html page

Hi,
I was wondering how I might display this on a page without it actually creatimg the link?

ie how is it printed in the code box below, not actually creating a link??


Code: Select all
 
<a href='http://www.xxxxxxxxxxxxxx.com.au/index.php'>link anchor text</a>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Oct 8th, 2007, 10:46
Rakuli's Avatar
SuperMember

SuperMember
Join Date: Sep 2007
Location: Australia
Age: 24
Posts: 956
Blog Entries: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Display link code in html page

convert the html entities.

eg.

HTML: Select all
&lt;a href='http://www.xxxxxxxxx.com.au/index.php'&gt;link anchor text&lt;/a&gt;
Each character that is used as part of the HTML structure has a code.

A small list can be found here http://www.w3schools.com/tags/ref_entities.asp
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Oct 8th, 2007, 12:27
SuperMember

SuperMember
Join Date: Apr 2007
Location: Sydney
Posts: 159
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Display link code in html page

ahh of course, thank you!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Oct 9th, 2007, 13:53
Junior Member
Join Date: Sep 2007
Location: Pakistan
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Display link code in html page

thanks for helping me indirectly
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Oct 9th, 2007, 15:49
Elite Veteran
Join Date: Aug 2005
Location: That Place
Posts: 2,044
Blog Entries: 1
Thanks: 0
Thanked 37 Times in 37 Posts
Re: Display link code in html page

Actually:

Code: Select all
&lt;a href=&quot;http://www.xxxxxxxxx.com.au/index.php&quot;&gt;link anchor text&lt;/a&gt;
forgot the HTML equiv of the quotes.
__________________

Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Oct 9th, 2007, 15:58
Elite Veteran
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Display link code in html page

I never got a problem with the quotes?!?

If you wrap your code in <code> tags then you shouldn't have a problem with that no?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old Oct 9th, 2007, 17:00
alexgeek's Avatar
Moderator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,812
Blog Entries: 9
Thanks: 2
Thanked 2 Times in 2 Posts
Re: Display link code in html page

This tools converts it for you automatically ( JackFranklin found it ).
http://www.simplebits.com/cgi-bin/si...l?mode=process
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
Old Oct 9th, 2007, 19:50
Marc's Avatar
Staff Manager

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Posts: 1,780
Thanks: 0
Thanked 16 Times in 16 Posts
Re: Display link code in html page

Isnt there also a PHP function for this sort of stuff? I cant remember it now when i come to think of it!

eg. It would convert < to &lt; and so on!
__________________
Marc
Staff Manager - Webforumz.com


Want to be a moderator? PM me.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9  
Old Oct 9th, 2007, 20:13
Elite Veteran
Join Date: Aug 2005
Location: That Place
Posts: 2,044
Blog Entries: 1
Thanks: 0
Thanked 37 Times in 37 Posts
Re: Display link code in html page

Preg Replace would be the function no?
__________________

Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #10  
Old Oct 9th, 2007, 20:18
Marc's Avatar
Staff Manager

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Posts: 1,780
Thanks: 0
Thanked 16 Times in 16 Posts
Re: Display link code in html page

Errr.. Its somthing like that
__________________
Marc
Staff Manager - Webforumz.com


Want to be a moderator? PM me.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #11  
Old Oct 9th, 2007, 20:56
Elite Veteran
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Display link code in html page

htmlentities()
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #12  
Old Oct 9th, 2007, 20:56
Jack Franklin's Avatar
Moderator

SuperMember
Join Date: May 2007
Location: Cornwall, England
Posts: 1,405
Blog Entries: 8
Thanks: 18
Thanked 14 Times in 14 Posts
Re: Display link code in html page

Use this to take html code and chuck in the &lt; etc
http://www.simplebits.com/cgi-bin/si...l?mode=process
__________________
Jack Franklin - Webforumz Moderator
(x)HTML | CSS | PHP | MySQL | JQuery (Javascript)
Contact: My Blog | Twitter | Delicious
Want Lessons? PM me.
If you think I've helped, please press the 'Thanks' Button.
Last Blog Entry: A Week with VBulletin (Aug 28th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #13  
Old Oct 9th, 2007, 21:00
Marc's Avatar
Staff Manager

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Posts: 1,780
Thanks: 0
Thanked 16 Times in 16 Posts
Re: Display link code in html page

Quote:
Originally Posted by jackfranklin View Post
Use this to take html code and chuck in the &lt; etc
http://www.simplebits.com/cgi-bin/si...l?mode=process

Yep, alex has already said this .

Karinne thats the one!
__________________
Marc
Staff Manager - Webforumz.com


Want to be a moderator? PM me.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #14  
Old Oct 11th, 2007, 23:57
alexgeek's Avatar
Moderator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,812
Blog Entries: 9
Thanks: 2
Thanked 2 Times in 2 Posts
Re: Display link code in html page

Yes, I used htmlentities for form inputs to stop people executing malicious scripts,
but this is another use for it!
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a html code to make a page a certain size allstar Web Page Design 4 May 5th, 2008 20:25
Pointing a link to dir instead of html page plato Starting Out 2 Aug 20th, 2007 21:04
html code for link? cj550 Web Page Design 2 Mar 30th, 2007 16:03
How to link HTML page to CSS file winwin Web Page Design 18 Dec 21st, 2006 09:46
Access a HTML InputBox through the Code-Page bwalker ASP.NET Forum 5 Nov 10th, 2005 12:58


All times are GMT. The time now is 21:18.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42