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.



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

Notices


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

SuperMember
Join Date: Apr 2007
Location: Sydney
Posts: 154
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>
Reply With Quote

  #2 (permalink)  
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)
Reply With Quote
  #3 (permalink)  
Old Oct 8th, 2007, 12:27
SuperMember

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

ahh of course, thank you!
Reply With Quote
  #4 (permalink)  
Old Oct 9th, 2007, 13:53
Junior Member
Join Date: Sep 2007
Location: Pakistan
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Syed Zaeem Send a message via Yahoo to Syed Zaeem
Re: Display link code in html page

thanks for helping me indirectly
Reply With Quote
  #5 (permalink)  
Old Oct 9th, 2007, 15:49
moojoo's Avatar
Moderator
Join Date: Aug 2005
Location: Texas
Age: 31
Posts: 1,608
Thanks: 0
Thanked 6 Times in 6 Posts
Send a message via AIM to moojoo Send a message via MSN to moojoo Send a message via Yahoo to moojoo
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.
__________________
I've got <style> and .class
Reply With Quote
  #6 (permalink)  
Old Oct 9th, 2007, 15:58
karinne's Avatar
SuperMember

SuperMember
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?
Reply With Quote
  #7 (permalink)  
Old Oct 9th, 2007, 17:00
alexgeek's Avatar
Administrator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,771
Blog Entries: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alexgeek
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)
Reply With Quote
  #8 (permalink)  
Old Oct 9th, 2007, 19:50
Marc's Avatar
Moderator

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Age: 15
Posts: 1,637
Thanks: 0
Thanked 6 Times in 6 Posts
Send a message via MSN to Marc Send a message via Skype™ to Marc
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!
Reply With Quote
  #9 (permalink)  
Old Oct 9th, 2007, 20:13
moojoo's Avatar
Moderator
Join Date: Aug 2005
Location: Texas
Age: 31
Posts: 1,608
Thanks: 0
Thanked 6 Times in 6 Posts
Send a message via AIM to moojoo Send a message via MSN to moojoo Send a message via Yahoo to moojoo
Re: Display link code in html page

Preg Replace would be the function no?
__________________
I've got <style> and .class
Reply With Quote
  #10 (permalink)  
Old Oct 9th, 2007, 20:18
Marc's Avatar
Moderator

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Age: 15
Posts: 1,637
Thanks: 0
Thanked 6 Times in 6 Posts
Send a message via MSN to Marc Send a message via Skype™ to Marc
Re: Display link code in html page

Errr.. Its somthing like that
Reply With Quote
  #11 (permalink)  
Old Oct 9th, 2007, 20:56
karinne's Avatar
SuperMember

SuperMember
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()
Reply With Quote
  #12 (permalink)  
Old Oct 9th, 2007, 20:56
Jack Franklin's Avatar
Resources Administrator

SuperMember
Join Date: May 2007
Location: Cornwall, England
Posts: 1,266
Blog Entries: 7
Thanks: 10
Thanked 4 Times in 4 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
Last Blog Entry: My Latest Project - Grilling Gurus... (Jun 11th, 2008)
Reply With Quote
  #13 (permalink)  
Old Oct 9th, 2007, 21:00
Marc's Avatar
Moderator

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Age: 15
Posts: 1,637
Thanks: 0
Thanked 6 Times in 6 Posts
Send a message via MSN to Marc Send a message via Skype™ to Marc
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!
Reply With Quote
  #14 (permalink)  
Old Oct 11th, 2007, 23:57
alexgeek's Avatar
Administrator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,771
Blog Entries: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alexgeek
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)
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 01:45.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs 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 43