homepage Welcome to WebmasterWorld Guest from 54.225.24.227
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
How to show html code on a web page
need to show an example of code
Deep_Woods




msg:569152
 6:45 pm on Aug 8, 2005 (gmt 0)

I have cms set up on a website for the owner to post images and text. I am building a help page to show him how to insert images via html. I need to show an example of the actual code of an image. How can I do this?

 

hexdj




msg:569153
 7:11 pm on Aug 8, 2005 (gmt 0)

Just wrap whatever HTML code u want him to read inside a <pre> tag (it can be any tag you want) that way he will see it as regular readable text and the browser won't process that code.

Deep_Woods




msg:569154
 8:35 pm on Aug 8, 2005 (gmt 0)

It will work like that but it won't let me add the < and > to the html code...when I add the brackets it shows an image placemat.

?

hexdj




msg:569155
 8:45 pm on Aug 8, 2005 (gmt 0)

to insert a "<" you will have to type in: &lt;

and for ">" type &gt; in YOUR html code

that should do the trick, the ampersand and the semi-colon are both required

aaronpaul




msg:569156
 8:46 pm on Aug 8, 2005 (gmt 0)

You can replace the "<" and ">" with the ASCII code for those characters.

So, it would look like this:

<pre>
&lt;img src="image.jpg" width="20" height="20" border="0" alt=""&gt;
</pre>

and would look like this when viewed in a browser:
<img src="image.jpg" width="20" height="20" border="0" alt="">

Deep_Woods




msg:569157
 8:51 pm on Aug 8, 2005 (gmt 0)

Thanks folks...great job!
I knew there was a way to do that but I could not for the life of me remember what it was. ;)

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved