HTML editing - span

R

Roger

Hello,

I found out weird behaviours when editing html using Word 2003.
Going straight to the point: take a document having the included HTML source.
This document has just a table with three cells. Each cell contains a span
element marked with an id and a title (when you open it with IE, each cell
shows a tooltip with its title).
Open it with Word, select the cell in the middle of the table and cut it.
As a result now the second (and last) cell displays the correct text, but
the contained span attributes keep being those of the cutted cell.

Furthermore if you delete the "<P> </P>" just after the DIV element, then
open the document with Word and just save it as another html file, you will
see that the span located in the first cell is gone! I think it is related to
the presence of some text before the table. If there's at least a space the
html content of the first cell is kept, otherwise not.

This kind of behaviors generate big problems when, as in my case, the marked
span elements must be identified by a controlling application.

Are those bugs or am I missing something?
Is there any way to mark span (or other) elements in some way that Word
keeps their attributes as they were originally?

Thanks in advance.
Ruggero Vecchio

----- Html source -----
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE></TITLE></HEAD>
<BODY>
<DIV>
<P> </P>
<TABLE
style="BORDER-RIGHT: black 1px solid; PADDING-RIGHT: 0px; BORDER-TOP: black
1px solid; PADDING-LEFT: 0px; FONT-SIZE: 10pt; PADDING-BOTTOM: 0px;
BORDER-LEFT: black 1px solid; WIDTH: 617px; PADDING-TOP: 0px; BORDER-BOTTOM:
black 1px solid; FONT-FAMILY: Verdana; BORDER-COLLAPSE: collapse;
BACKGROUND-COLOR: transparent"
cellSpacing=0 cellPadding=0 width=617>
<TBODY>
<TR height=26>
<TD
style="BORDER-RIGHT: black 1px solid; PADDING-RIGHT: 0px; BORDER-TOP:
black 1px solid; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; BORDER-LEFT: black
1px solid; PADDING-TOP: 0px; BORDER-BOTTOM: black 1px solid;"
width=96><P align=right style='text-align:right'><SPAN
id="cell1" title="This is cell 1">Cell1</SPAN></P></TD>
<TD
style="BORDER-RIGHT: black 1px solid; PADDING-RIGHT: 0px; BORDER-TOP:
black 1px solid; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; BORDER-LEFT: black
1px solid; PADDING-TOP: 0px; BORDER-BOTTOM: black 1px solid;"
width=103><P align=right style='text-align:right'><SPAN
id="cell2" title="This is cell 2">Cell2</SPAN></P></TD>
<TD
style="BORDER-RIGHT: black 1px solid; PADDING-RIGHT: 0px; BORDER-TOP:
black 1px solid; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; BORDER-LEFT: black
1px solid; PADDING-TOP: 0px; BORDER-BOTTOM: black 1px solid;"
width=109><P align=right style='text-align:right'><SPAN
id="cell3" title="This is cell
3">Cell3</SPAN></P></TD></TR></TBODY></TABLE></DIV></BODY></HTML>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top