|
Posted by Chris F.A. Johnson on 08/15/06 20:22
On 2006-08-15, ilyas@igsoftwaresolutions.co.uk wrote:
> H
>
> I have a simple document in word that I have saved as html using the
> save as options available in word 2003
>
> Whats peculiar is that when I view the source of this html document, I
> find a <p> element and inside it theres text with lots of white space.
> Now correct me if I am wrong but browsers ignore whitespace, but when I
> view this in a browser, the whitespace is clearly visible.
>
> This is fine! - in fact its what I want - but whats confusing me is
> that If I modify this <p> tag, such as deleting the whitespace and then
> press the spacebar to insert it back again, I find that the browser
> (Internet Explorer) ignore the whitespace!!
>
> Whats causing this whitespace, and how I can achive this behaviour so
> that I can control when whitespace is ignored ad when it is not ignored
> using html tags?
First, remember that saving as HTML in Word is not intended to give
you HTML that will work on a web site (to say the least); it tries
to save a document that can be re-imported as close to the original
as possible. (Whether it is succesful at that, I don't know, as
some HTML files I've seen exported from Word don't look anything
like the original .doc.)
Second, if you want to know what they did, look at the code. If
your modification changed the behaviour, look at what you modified.
If you still don't understand it (not surprising, considering that
Word's HTML is almost as complex as the .doc itself), post the
original and your modification here. Extract just enough from the
file to demonstrate the behaviour in both cases.
Third, if you intend to publish this on the WWW, DON'T. Learn a
little bit about HTML and CSS and copy the text into a real HTML
file.
--
Chris F.A. Johnson <http://cfaj.freeshell.org>
===================================================================
Author:
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
Navigation:
[Reply to this message]
|