Magically appearing hard returns

G

gary

I have webpages on a server and one day they were full of these hard
returns...some lines had 4 or 5 between each ones...some had 10 plus. As you
can imagine coding on such a page is a major pain and outside of going thru
and deleting them by hand, and risking deleting code as well, ive found no
way to do this. Yes i can delete all hard returns but the ones that actually
seperate the lines have to stay....just the mass amount between each line
must go...ive tried all i can think of with no luck...thank you...gary
 
J

Jezebel

What are you asking? How to delete empty paragaphs from a page? How to set
up your CSS to render paragraphs properly?

Where they come from in the first place? (Paragraphs don't magically appear
in web pages -- someone or something put them there.)

Since consecutive white space characters (including paragraphs) have no
effect on the way a page is rendered by the browser, why does it matter?
 
G

gary

first i agree they dont just magically appear...but are there none the
less...when i turn on the character map or whatever i is i can see all the
little p symbols...will the world stop spinning if they remain? no. but have
you ever had to work on code on 50+ pages where each line could have 2-22+
lines or hard returns between the next. Is a major pain...heck if i could
just get the larger gaps out in a relatively simple, productive way i would
be happy...yes i can highlight and delete...time consuming and run the risk
of accidently deleting code...can also set it to delete between
characters...not much faster than the above method...guess i was just asking
for a miracle...a program that could understnd the hard returns at the end of
lines of code should be kept while all others should be exterminated...so the
"why does ti matter" my sanity...hate the thought of the time im about to
waste highlighting and deleting all those hard returns...thanks...gary
 
J

Jezebel

If this is a document you've downloaded, just use find and replace: look for
^p^p and replace with ^p; click 'Replace all' repeatedly.
 
R

RobertVA

Jezebel said:
If this is a document you've downloaded, just use find and replace: look for
^p^p and replace with ^p; click 'Replace all' repeatedly.


Should find something a little more specialized than Word for editing
web pages too. I don't know about more recent versions, but Word 97 has
no way of displaying if a hard line break is the end of a paragraph
element, the end of a division element or a break. Word 97 also has a
habit of inserting a lot of spurious format elements and in line styles
for text where I would prefer to leave things to a definition in the
header or an external sheet. Demonstrations I have seen of some
Frontpage versions which seem to exibit some of the same habits.
 
J

Jezebel

but Word 97 has
no way of displaying if a hard line break is the end of a paragraph
element, the end of a division element or a break.

Not sure what you're referring to here. If you switch on formatting marks, paragraphs are shown as pilcrows (¶) and simple line breaks as down-left-arrow (¿). Section breaks are shown as dotted lines plus text if you switch to normal view. Word has no division breaks.


Word 97 also has a
habit of inserting a lot of spurious format elements and in line styles
for text where I would prefer to leave things to a definition in the
header or an external sheet.

Word is a computer program. It doesn't have habits.
 
R

RobertVA

Jezebel said:
but Word 97 has

Not sure what you're referring to here. If you switch on formatting
marks, paragraphs are shown as pilcrows (¶) and simple line breaks as
down-left-arrow (¿). Section breaks are shown as dotted lines plus text
if you switch to normal view. Word has no division breaks.


Word 97 also has a

Word is a computer program. It doesn't have habits.

OP is editing WEB PAGES. Web pages have elements like <p>/</p>
(paragraphs), <div></div> (divisions) and <br> (breaks, but some
recommend <br/>). The <br/> element is HTML's version of a "hard
return". The inclusion of the slash is a reminder that the element
doesn't require a second tag to end the element. With paragraphs and
divisions the text the author intends to appear on the page is typed
between the matching tags. The tags with the slash after the angle
bracket indicate the end of the element.

Word is a WORD PROCESSOR with the ability to export in HTML, not a HTML
(web page) Editor. It doesn't feature anything remotely resembling full
control over the WEB PAGE. HTML editors like Front Page come MUCH
closer, but still limit the author's ability to control the page's
formatting.

Browsers ignore carriage returns in the text portions of a web page's
source and combine white space (sequential combinations of multiple
spaces) into a single space. Multiple spaces can be forced with the
&nbsp; code (Non-Breaking SPace) and multiple line feeds with repeated
<br/> tags.

The "Habits" I referred to are the inability of the applications to give
the author FULL CONTROL over the page's formatting. While I'm sure a lot
of work went into creating them, they AREN'T beyond imposing the
application team's web page design philosophy on the page, overriding
the page author's intentions.
 
C

Cindy M.

Hi RobertVA,
The <br/> element is HTML's version of a "hard
return".
If we're going to be pedantic...

<br> is the Word equivalent of a "new line" (Shift+Return)

<p> is the equivalent of what in WordPerfect is referred to
as a "hard return". Word doesn't use that term, but it is
the equivalent of pressing ENTER, which is what a "hard
return" is in WP.

But I don't think anyone really disagrees with the core of what
you want to say: Word isn't the right tool for creating/editing
web pages.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update
Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-mail
:)
 
Top