HighDots Forums  

html inside <td></td> tags

alt.html.tags alt.html.tags


Discuss html inside <td></td> tags in the alt.html.tags forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Claus
 
Posts: n/a

Default html inside <td></td> tags - 12-30-2003 , 10:02 AM






Hi all,

I have an application that automattically creates a table with
contents that users are free to define.
Some users have requested the ability to display HTML contents, but it
ruins my table if the contents of a <td> </td> suddenly have to
contain i.e. <a href = "pic.jpg"
Resulting in : <td> <a href= "pic.jpg" </td>

Is there any way to display html inside a table td, without it being
affected of it ?

T.i.a.
Claus

Reply With Quote
  #2  
Old   
David Dorward
 
Posts: n/a

Default Re: html inside <td></td> tags - 12-30-2003 , 12:29 PM






Claus <> wrote:

Quote:
Is there any way to display html inside a table td, without it being
affected of it ?
Run the inputed data through an HTML validator and reject it if it doesn't
validate.

Possibly with a message such as:

The content you submitted included invalid HTML with the potential to cause
rendering issues on the site. Please correct your errors or resubmit data
as [plain text].

With the plain text submit button running the code through a routined to
convert & to &amp;, < to &lt; and > to &gt;.

--
David Dorward <http://dorward.me.uk/>


Reply With Quote
  #3  
Old   
Don & Sis
 
Posts: n/a

Default Re: html inside <td></td> tags - 12-31-2003 , 10:39 PM



Hi Claus::
*******I have used <xmp>code here</xmp> to show codes on a
web page. Also you can put brackets around each bracket in the code like
this <<>img src="url"<>>
I hope this helps you.

Don



Reply With Quote
  #4  
Old   
David Dorward
 
Posts: n/a

Default Re: html inside <td></td> tags - 01-01-2004 , 04:22 AM



Don & Sis wrote:
Quote:
I have used <xmp>code here</xmp> to show codes on a
web page.
Obsolete, and what happens when the submitted code includes </xmp>?

Quote:
Also you can put brackets around each bracket in the code like
this <<>img src="url"
Eugh! I'm not sure its valid, its certainly ugly. We have entities for this.

--
David Dorward <http://dorward.me.uk/>


Reply With Quote
  #5  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: html inside <td></td> tags - 01-01-2004 , 07:29 AM



David Dorward <dorward (AT) yahoo (DOT) com> wrote:

Quote:
Don & Sis wrote:
I have used <xmp>code here</xmp> to show codes on a web page.

Obsolete, and what happens when the submitted code includes </xmp>?
But doesn't it convey information about the quality of the HTML code
presented that way? Especially to users who have something nice for the
xmp monstrosity in their user style sheets.

Naturally, anyone who has to ask for help in displaying HTML code on a
Web page isn't qualified to teach HTML to others, but still less is
anyone who uses or advertizes XMP.

Quote:
Also you can put brackets around each bracket in the code like
this <<>img src="url"

Eugh! I'm not sure its valid, its certainly ugly. We have entities
for this.
Actually, there are no brackets there. And it's not valid XHTML.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html




Reply With Quote
  #6  
Old   
J&D
 
Posts: n/a

Default Re: html inside <td></td> tags - 01-02-2004 , 01:40 PM



Quote:
"Don & Sis" <dmsmm (AT) webtv (DOT) net> Hi Claus::
I have used <xmp>code here</xmp> to show codes on a
..>>web page. Also you can put brackets around each bracket in the code like
this <<>img src="url"
I hope this helps you.
I'm afraid that <xmp>...</xmp> is not valid html tag

J&D



Reply With Quote
  #7  
Old   
Phrostbyte Multimedia
 
Posts: n/a

Default Re: html inside <td></td> tags - 02-27-2004 , 02:56 PM



<Claus> wrote in message

<snip>

Quote:
Is there any way to display html inside a table td, without it being
affected of it ?

T.i.a.
Claus
yes there is, and it's simple. to use your example:
<td><a href="pic.jpg"></td> will not work, obviously, because it is actual
code. instead substitute the special character for the less than, greater
than, and the quotes. for example :
< = &lt;
Quote:
=
" = &quot;
so, the above example would read :
<td>&lt;a href=&quot;pic.jpg&quot;&gt;</td>
note : even though it may not be essential to change all of the <'s and >'s
to &lt; or &gt; I do so anyway just because you never know what odd browser
someone may be using.

hope this helped
Sev
Phrostbyte Multimedia




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.