Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy text from webpage

Status
Not open for further replies.

jslmvl

Vendor
Jan 26, 2008
268
GB
Hi,

I want to copy some text from a webpage by Ctrl-C, Ctrl-V and got a few lines from a single line in the page.
I tried to find out why by doing following steps:

1. View, Source, Ctrl-A, Ctrl-C, Open an empty text file by Notepad and Ctrl-V onto it. Save the text file as file1.htm (text Documents (*.txt))
I then simplified file1.htm, it became
<table>
<tr>
<td>
aaaaa
</td>
<td>
bbbbb
</td>
</tr>
</table>

2. I run file1.htm in IE and it displied
aaaa bbbb

3. I copy above text by Ctrl-C, then Ctrl-V onto a text file and got 3 lines
aaaa
(empty line)
bbbbb

4. I did Save As file1.htm to file2.htm (text Documents (*.txt)), run file2.htm in IE and it displied
aaaa bbbb
as the same as file1.htm. However when I copy above text by Ctrl-C and then Ctrl-V onto a text file, I got a single line
aaaa bbbb

I hope you can tell me why and tell me how to copy text from webpage one line to one line.

Thank you so much in advance!
 
In your first example the text might appear as one line but is not one line. It is 2 different lines of text each in their own table cell (I won't get into table less here).

In the second example you get one line of text (whether there is one empty space between words or 1 million the display will be the same).

Appearance's can be misleading.

Darryn Cooke
| Marketing and Creative Services
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top