Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Why is <pre> not working??

Reply
Thread Tools

Why is <pre> not working??

 
 
techfiddle
Guest
Posts: n/a
 
      10-09-2006
Collective Wisdom:

I'm designing a page to give people a block of source code:

http://www.geocities.com/techfiddle/...bringcode.html

However, for some reason which I cannot determine, the <pre> </pre>
function isn't working, and the graphic is showing up.

Why is this, and how can I fix it?

Many thanks!
Connie

 
Reply With Quote
 
 
 
 
Chris F.A. Johnson
Guest
Posts: n/a
 
      10-09-2006
On 2006-10-09, techfiddle wrote:
> Collective Wisdom:
>
> I'm designing a page to give people a block of source code:
>
> http://www.geocities.com/techfiddle/...bringcode.html
>
> However, for some reason which I cannot determine, the <pre> </pre>
> function isn't working, and the graphic is showing up.
>
> Why is this, and how can I fix it?


In a <pre> element, tags are parse as such. Change '<' to '&lt;'
and ampersands to '&amp;'. (Do not include the single quotes.)

--
Chris F.A. Johnson <http://cfaj.freeshell.org>
================================================== =================
Author:
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
 
Reply With Quote
 
 
 
 
techfiddle
Guest
Posts: n/a
 
      10-09-2006
> In a <pre> element, tags are parse as such. Change '<' to '&lt;'
> and ampersands to '&amp;'. (Do not include the single quotes.)



Chris, thank you for responding to this. I'm really not following you.

I changed the chevrons to &lt and the ampersand to &amp;

that didn't fix it.

 
Reply With Quote
 
Beauregard T. Shagnasty
Guest
Posts: n/a
 
      10-09-2006
techfiddle wrote:

>> In a <pre> element, tags are parse as such. Change '<' to '&lt;' and
>> ampersands to '&amp;'. (Do not include the single quotes.)

>
> Chris, thank you for responding to this. I'm really not following
> you.
>
> I changed the chevrons to &lt and the ampersand to &amp;
> that didn't fix it.


Not these: [quote:] &lt;pre&amp;

All the ones *in between* <pre> and </pre>

For conformity, you should also change the > to &gt;
so you have matching pairs. Not required, but a good idea.

--
-bts
-Motorcycles defy gravity; cars just suck
 
Reply With Quote
 
Andrew
Guest
Posts: n/a
 
      10-09-2006
On 8 Oct 2006 17:35:19 -0700, "techfiddle"
<(E-Mail Removed)> wrote:

>> In a <pre> element, tags are parse as such. Change '<' to '&lt;'
>> and ampersands to '&amp;'. (Do not include the single quotes.)

>
>
>Chris, thank you for responding to this. I'm really not following you.
>
>I changed the chevrons to &lt and the ampersand to &amp;
>
>that didn't fix it.


Hi,

Looks like you have fixed it. Just a small point but do you really
need the <br> tags in your <pre> </pre> element?

All the best!

Andrew.
--

Andrew
http://www.andrews-corner.org/
 
Reply With Quote
 
techfiddle
Guest
Posts: n/a
 
      10-09-2006
Hi Andrew:

I appreciate everyone's help so much! Yeah, regarding the <br> tags,
the text was flowing over into the right side too much, but no, I need
to remove them. And that "dot" between TOC and JOIN is really not
right yet.



Andrew wrote:
> On 8 Oct 2006 17:35:19 -0700, "techfiddle"
> <(E-Mail Removed)> wrote:
>
> >> In a <pre> element, tags are parse as such. Change '<' to '&lt;'
> >> and ampersands to '&amp;'. (Do not include the single quotes.)

> >
> >
> >Chris, thank you for responding to this. I'm really not following you.
> >
> >I changed the chevrons to &lt and the ampersand to &amp;
> >
> >that didn't fix it.

>
> Hi,
>
> Looks like you have fixed it. Just a small point but do you really
> need the <br> tags in your <pre> </pre> element?
>
> All the best!
>
> Andrew.
> --
>
> Andrew
> http://www.andrews-corner.org/


 
Reply With Quote
 
techfiddle
Guest
Posts: n/a
 
      10-09-2006
Thank you so much!

Does anyone know if there is a better way of doing the bullet besides:



that's just showing as a bullet, and my guess is it will show as weird
junk on other people's pages..??

Thanks!

(When did the <pre> thing change? It always worked before. I tried it
in two browsers and it woudln't work...)

 
Reply With Quote
 
Beauregard T. Shagnasty
Guest
Posts: n/a
 
      10-09-2006
techfiddle wrote:

> (When did the <pre> thing change? It always worked before. I tried it
> in two browsers and it woudln't work...)


Do you mean in regards to the < and the &lt; ?

Never. If you desire to show HTML source as content, you have always
needed to change them. Within a <pre> or not.

--
-bts
-Motorcycles defy gravity; cars just suck
 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      10-09-2006
Scripsit techfiddle:

> Does anyone know if there is a better way of doing the bullet besides:
>
> •
>
> that's just showing as a bullet, and my guess is it will show as weird
> junk on other people's pages..??


You still haven't understood the principle of encoding "&".

The whole "webring" stuff is weird junk.

As I've often said, people who need to ask about such an elementary thing as
"how do I show HTML code visibly on my page" aren't competent to give others
advice on HTML coding, by showing HTML code that others should put on their
pages. The code you are promoting isn't still even syntactically correct -
you are telling people to use the undefined entity reference &body, and you
_still_ have unescaped "<" characters.

But to answer the question you asked, instead of the questions you should
have asked before you got started: Some people would say that &bull; is more
mnemonic, and others remind that some old browsers don't understand it. You
can also "do the bullet" by inserting the bullet character as data,
naturally provided that the encoding of the document allows that.

> (When did the <pre> thing change? It always worked before. I tried
> it in two browsers and it woudln't work...)


This also tells that your knowledge of HTML is far too limited to make you
competent to tell others what they should put into their HTML code. There
was never any change in <pre> behavior in recognizing tags inside the
element; you are simply mistaken.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

 
Reply With Quote
 
Andy Dingley
Guest
Posts: n/a
 
      10-09-2006

Jukka K. Korpela wrote:

> This also tells that your knowledge of HTML is far too limited to make you
> competent to tell others what they should put into their HTML code.


The OP isn't claiming to be an authority on HTML,
they're claiming to be an authority on the violin webring.

The fundamental guiding principles of the web are these:

2. Some technical stuff.
1. Easy access to publishing.

Now your point is a good one as regards #2. The idea of some of the
nearby posters updating their "web authoring guides" is indeed
horrible. But what do we do about #1 ? Are _you_ ever going to have
time to post joining instructions for the violin webring? Otherwise
are you really advocating that the violin webring should be abandoned
because there's no-one connected with it sufficiently skilled in HTML
minutiae to describe it perfectly? The rainbow ruler GIF and animated
under construction banners were some terrible old sites in technical
terms, but I'd rather see them around than have an empty gap because
there's no-one "sufficiently certified" and also with the interest in
violins to build their pages.

To the OP - your page isn't perfect, but even an imperfect page is
always better than nothing. Stay tuned and maybe someone will continue
to assist you getting it spot-on.

 
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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why :: ? Why not : ? Why not . ? <- less clutter ?!? Skybuck Flying C++ 16 08-25-2007 09:48 PM
why why why why why Mr. SweatyFinger ASP .Net 4 12-21-2006 01:15 PM
findcontrol("PlaceHolderPrice") why why why why why why why why why why why Mr. SweatyFinger ASP .Net 2 12-02-2006 03:46 PM
why why why does function not work Horace Nunley ASP .Net 1 09-27-2006 09:52 PM
Cisco 2611 and Cisco 1721 : Why , why , why ????? sam@nospam.org Cisco 10 05-01-2005 08:49 AM



Advertisments