Microsoft Word 2003 and html

I

ilyas

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?

Many thanks!
 
P

Paul Watt

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?

Many thanks!

Hi,

Firstly, Please,Please,Please don't use word to make web pages. It produces
horrible code. You're much better of with a Notepad and a few hours at
http://www.w3schools.com .

As to your question use &nbsp to insert a space in a document.
--
Cheers

Paul
le singe est dans l'arbre
http://www.paulwatt.info
 
S

SteveSomebody

Paul said:
Firstly, Please,Please,Please don't use word to make web pages. It produces
horrible code. You're much better of with a Notepad and a few hours at
http://www.w3schools.com .
As to your question use &nbsp to insert a space in a document.

Good post Paul

Ed said:
That was your mistake. Never do that.

My grandmother said, "if you haven't got anything worthwhile to say,
don't say it." That's good advice Ed.

Steve
www.fontmadness.com
"You are, the only thing that shines"
 
C

Chris F.A. Johnson

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.
 
J

Jukka K. Korpela

Paul Watt said:
Firstly, Please,Please,Please don't use word to make web pages.

The Web would be a much better place if everyone used Word 2003 for spell
checking of pages. Conversion from Word 2003 format to decent HTML format is
a different thing, but doable. People who claim the opposite just don't know
how to do such things and expect everyone else to be equally ignorant. I
wouldn't recommend Word 2003 as John Q. Public's primary web authoring
software, but that's a different matter.
You're much better of with a Notepad

As a method of converting a Word document into a web page? Give me a break.

The w3schools site is known for its unreliable and inaccurate content.
As to your question use &nbsp to insert a space in a document.

Nonsense, especially as an answer to the question that was asked.
 
J

Jukka K. Korpela

I have a simple document in word that I have saved as html using the
save as options available in word 2003

You should use the option of saving as "compact HTML". Sorry, I haven't got
Word 2003, and I'm too tired to open even Word 2002 to check where exactly
you can find the option, but the point is that Word is able to save a
document in a relatively pure HTML format, with much of the Office noise
removed. Then you just have to delete the stylesheet (<style> element) and
either leave the document unstyled or write a simple and robust stylesheet
to your taste. You may also need to remove lots of WIDTH attributes if you
have tables, so you need a good editor or a lot of patience and care.
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.

Within the _element_?
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!!

The _tag_? I suppose you mean the element content.

Without seeing the patient, I won't make a guess on what's going on, but the
spaces might be no-break spaces, which look just like spaces in most
editors. Anyway, maybe this problem will just go away if you save the
document as "compact HTML". If not, I guess we need a URL.
 
E

Ed Seedhouse

Ed Seedhouse wrote:
My grandmother said, "if you haven't got anything worthwhile to say,
don't say it." That's good advice Ed.

Er, this *is* usenet, isn't it? Actually I thought it was a worthwhile
thing to say - as a matter of fact I still do.
 
D

dorayme

Ed Seedhouse said:
Er, this *is* usenet, isn't it? Actually I thought it was a worthwhile
thing to say - as a matter of fact I still do.

It is hopeless advice. Sorry, I know it is widely believed if not
practiced and blessings to you dear grandmother.

Here is the argument:

If anyone says anything they obviously think it worth saying.
 
P

Paul Watt

Jukka K. Korpela said:
The Web would be a much better place if everyone used Word 2003 for spell
checking of pages. Conversion from Word 2003 format to decent HTML format
is a different thing, but doable. People who claim the opposite just don't
know how to do such things and expect everyone else to be equally
ignorant. I wouldn't recommend Word 2003 as John Q. Public's primary web
authoring software, but that's a different matter.


As a method of converting a Word document into a web page? Give me a
break.


The w3schools site is known for its unreliable and inaccurate content.


Nonsense, especially as an answer to the question that was asked.

So you're saying that &nbsp; ISN'T the way to add a space to a paragraph?

I wasn't saying that notepad was the way to convert word 2003 generated to
"decent" HTML, I was saying that it's better to use notepad and HTML to
generate pages in the first place.

--
Cheers

Paul
le singe est dans l'arbre
http://www.paulwatt.info
 
J

Jonathan N. Little

Paul said:
So you're saying that &nbsp; ISN'T the way to add a space to a paragraph?

Exactly!If you need to adjust the spacing of any block element like P,
adjust 'margin' and 'padding' in the stylesheet. The only situation that
I can think of now for using '&nbsp;' is where you have a two term that
you wish to 'glue' together, if you had more than two words I would
probably style a SPAN.
I wasn't saying that notepad was the way to convert word 2003 generated to
"decent" HTML, I was saying that it's better to use notepad and HTML to
generate pages in the first place.

I too wish folks would use a word processor with extended spelling and
grammar check to develop the 'copy' for their sites. And as with printed
versions you would not use the word processor to directly layout a book
one should not use it to layout a webpage. The clipboard is your friend!
A simple text editor or better one with syntax highlighting (I like
CrimsonEditor) coupled with a template that you can make can be a very
efficient process. Basic HTML is not rocket-science!
 
P

Paul Watt

Jonathan N. Little said:
Exactly!If you need to adjust the spacing of any block element like P,
adjust 'margin' and 'padding' in the stylesheet. The only situation that I
can think of now for using '&nbsp;' is where you have a two term that you
wish to 'glue' together, if you had more than two words I would probably
style a SPAN.
OK yes you're right, but without seeing the OP's page we'll never know where
he wants the whitespace. There may be a better solution, indipendant <divs>
or what-not.

I too wish folks would use a word processor with extended spelling and
grammar check to develop the 'copy' for their sites. And as with printed
versions you would not use the word processor to directly layout a book
one should not use it to layout a webpage. The clipboard is your friend! A
simple text editor or better one with syntax highlighting (I like
CrimsonEditor) coupled with a template that you can make can be a very
efficient process. Basic HTML is not rocket-science!

I'm not talking about the copy, I'm talking about the HTML

--
Cheers

Paul
le singe est dans l'arbre
http://www.paulwatt.info
 
J

Jonathan N. Little

Paul said:
I'm not talking about the copy, I'm talking about the HTML

We may be saying the same thing, I would only recommend the word
processor for the development of the 'copy' and not the 'markup'. The
markup (HTML) is not very complicated on the whole, especially if one
restricts it to the semantic structure and styles with CSS. The text
editor is what I recommend for the markup. I have not been impressed by
any conversion filter or WYSIWYG editor, some a notably better than
others but IMO not nearly as good as by hand.
 
P

Paul Watt

Jonathan N. Little said:
We may be saying the same thing, I would only recommend the word processor
for the development of the 'copy' and not the 'markup'. The markup (HTML)
is not very complicated on the whole, especially if one restricts it to
the semantic structure and styles with CSS. The text editor is what I
recommend for the markup. I have not been impressed by any conversion
filter or WYSIWYG editor, some a notably better than others but IMO not
nearly as good as by hand.

Agreed. We could of been going around in circles for hours! :)

P.S. I don't know if you know but some of the links on your site are dead. I
was having a nose around on some of your links to "sites designed" and there
was some dead 'uns.


--
Cheers

Paul
le singe est dans l'arbre
http://www.paulwatt.info
 
J

Jonathan N. Little

Paul said:
P.S. I don't know if you know but some of the links on your site are dead. I
was having a nose around on some of your links to "sites designed" and there
was some dead 'uns.
Thanks, I have been too busy on other projects (and 'wasting' time
here!) I need to run the ol' Xenu again
 
J

Jonathan N. Little

dorayme said:
What about basically coping with IE5 and 6?

If you are not trying to to pixel-defined layouts and emphasize flexibly
in your design even IE 6 will handle most. IE5 is almost as rare as NN4
in my server logs.
 
D

dorayme

What about basically coping with IE5 and 6?

If you are not trying to to pixel-defined layouts and emphasize flexibly
in your design even IE 6 will handle most.[/QUOTE]

I spend a bit of time thinking about getting it to make like it
honours a min-width spec. Spend too much time on things like this
situation:

html and body not less than 100% wide, say a wrapper as direct
child, also not less than 100% wide

Static right col (margin-left 60 or more %), left floated box 57%
width all in a wrapper of 100% width (say no border, no padding,
body not set to less than 100% width, wrapper direct child of
body)

Always worrying about the static right staying next to the left
content (scroll bars appearing then) and not dropping down when
window is reduced (for folk on small screens or big res mainly).
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top