Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Old 12-24-2009, 01:17 AM using pre tag
Ultra Talker

Posts: 254
Trades: 0
when i want to display code in a page that should not be executed i write that html code inside

example 1

<pre>
<code>
#div{
float: left;
width: 900px;
height: auto;
}

</code>
</pre>

this is working fine, however when i write the following code, it is not appearing as code, instead it is being executed.

example 2

<pre>
<code>
<div id="topmenu">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About Us</a></li>
<li><a href="#">Contact Us</a></li>
</ul>
</div>
</code>
</pre>

the list in this code is being executed, however i want the list code to appear like a code as in example 1

please advice.

thanks
sudhakararaog is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-24-2009, 03:23 AM Re: using pre tag
joebert's Avatar
Novice Talker

Posts: 5
Name: joe
Location: Clearwater, FL USA
Trades: 0
Within your code blocks, replace all instances of "<" with "&lt;" and all instances of ">" with "&gt;". If you want to know more, the term you're looking for is "HTML Entities".
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
joebert is offline
Reply With Quote
View Public Profile Visit joebert's homepage!
 
Old 12-24-2009, 07:05 AM Re: using pre tag
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,371
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
http://www.webmaster-talk.com/html-f...play-code.html
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to using pre tag
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.20860 seconds with 12 queries