Html code?

liunx

Guest
What HTML code do i use to show code on a webpage? <br />
<br />
Any examples out there that i can see?<!--content-->My favorite is to simply change the less than character which is the first part of every tag to be < instead.<!--content-->Originally posted by Dave Clark <br />
You may be able to use the <PRE></PRE> tags for this, too. <br />
You still need " < and > for ", < and > respectively, don't you?<!--content-->< seems to be enough for me, and I do like to keep things simple.<br />
<br />
But no, I don't believe you'd need this if you used the <pre> and </pre> tags, but then you might lose some formating of how things look.<!--content-->Two examples I tried:<br />
<br />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"<br />
"http://www.w3.org/TR/html4/strict.dtd"><br />
<br />
<html><br />
<head><br />
<title></title><br />
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1"><br />
</head><br />
<br />
<body><br />
<pre><b>This is some bold text</b>.</pre><br />
<p>As you can see, you need to enclose the text you need to be made bold within<br />
<b> and </b>. This is preferred way of making text visually<br />
bold-faced. If this text has to be emphasized, use <strong> and<br />
</strong> instead. Semantically, this means that this text is<br />
"spoken" more strongly than rest of the paragraph. Visually, both<br />
<b> and <strong> may look the same.</p><br />
</body><br />
</html><br />
<br />
In the second example, I used<br />
<br />
<pre><b>This is some bold text</b>.</pre><br />
<br />
No brainer that the latter worked. Former just made the PREformatted text boldface.<!--content-->
 
Back
Top