Forum Moderators: open
When I asked him to look at the unbroken tag in a certain area, he responded that the tag was wrapping (broken) where it shouldn't have been.
I came to realize that the default setting for Note Pad on Windows is to wrap words. While in Note Pad, go to Edit and then uncheck Word Wrap.
Once he did this, he saw the correct html structure of the page. Do any of you give much thought to this? I mean, are you as anal as I when it comes to formatting html? How many of you have Word Wrap checked? Unchecked? Toggle between the two?
(edited by: pageoneresults at 8:25 pm (utc) on May 9, 2002)
Sometimes I dont have a line break period :) All just one long line of HTML. I understand what you mean, because taking word wrap off when viewing my FrontPage generated HTML it reverts to the one line HTML it was intended to be.
I wouldnt call it being anal, I try to stick to a routine, so each day I can do it better sorta thing :)
/Fancy OT suggestion
use a db, that your client can access, which can allow him to alter/create pages by using a form connected to the db. Since most HTML is repeated again, and again and again (like my long WebmasterWorld name :) .... You could leave a message in the HTML like "change tis bit". You could do this by prefilling the form with the basics of the HTML page (or indeed HTML of a template), where you could also have commonly used HTML tags on the page ready to be "cut and pasted" into a form
phew, off topic ;) My point is just that really, the lowest common denominator / least permutations is best, especially when it involves clients fiddling around with the likes of HTML!
/added
look at the URL littleman posted here [webmasterworld.com...] ...look at their source code (if thats ok).... do you think this is a common occurrence ? :) I see it a lot
Hey, all of my sites have been selected as candidates in the Miss HTML pageant!
On the Word Wrap subject, I was referring mainly to viewing source code using Note Pad. I don't think I could work in an Editing environment where Word Wrap was on. I'm just too comfortable with my current methods.
free HTML editor that includes a "beautify" feature
This is HTML Tidy, which is not an editor, but does some validation and processing. It is integrated into HTML-Kit and probably other editors but is designed as a stand-alone Unix app. Dave Ragget has now given it up and made it a SourceForge project.
no breaks to save bandwidth. The beginning of ending of sections are commented to act as a visual aid during editing
*This* seems anal. A line break is only two bytes in a Windows file (CR/LF) and one in Unix (LF) or Mac (CR). So if you have a 1KB image, that's like 1000 line breaks in Unix. If your files are 1000 lines long, I would still say that the extra 1KB is not going to make any difference. The only reason I can see for deleting all line breaks is for code obfuscation, but of course I can easily search and replace on tags and get them back. In any case, an *empty* comment is as much bandwidth as eight line breaks. If I wanted to save bandwidth, I would use regex searches to delete all comments from the file before going live. Anyway, generally speaking, text is cheap, so why bother. Get rid of one 1KB image and a single nested table, and you gain as much as getting rid of 2000 line breaks (maybe 1000 if it's a Windows file)
Do any of you give much thought to this?
It depends on context. If it is a collaborative project using revision tracking (i.e. CVS - best tool ever), you have to be careful about changing spaces or line breaks and, if you accidentally convert Unix line breaks to Windows, you're colleagues will hate you. Frankly, I like code that looks nice. I think I must be anal - I try to make my dynamic scripts generate nice-looking HTML. It helps so much with debugging when you have a complicated dynamic page.
Tom
Tom
not just bandwidth, its annoying for people trying to read your source code. Actually, my average bandwidth per page view is 6.1 kilobytes (not graphics intensive).....so that kilobyte you talk about over 10 000 page views means alot, especially when I have a 3Gb bandwidth limit. Basically, 1k is like adding another 15% of defunct code to my page. I could make them more colourful for the relative cost (and rankings) of a larger page
ergophobe, im a tad OT, but you might want to check out two threads, youll find them from site search up the top. 1st search "40kb sweetspot", in regards to line breaks and another about google rankings and file size (youll have to find that one yourself ..... unless someone can chip in a URL) :) Im sure Woz and Brett discussed it, or were at least involved...
that kilobyte you talk about
I was thinking of an extreme case there - a Unix page with 1000 extra line breaks.
It is really the left spaces you trim
Yeah, that was stupid... you have to count it all. That changes my calculation considerably doesn't it? An average ten-space indent suddenly makes each line break 11-12 bytes, which is 1kb for a 90-line file, which does start to add up.
Hmmm.... that has me thinking about getting rid of some line breaks.
Tom
[edited now that I found it with Google]
the other thread i was talking about took a sample of file sizes in comparison to google rankings, which indicated that between around 5-10k of code used per page is best in regards to google
im good at remembering the old threads, rubbish at finding them ;) They are around, in amongst other quality similar threads
Google Document Sizes [searchengineworld.com]
A related thread to the one im trying to find
[webmasterworld.com...]
i know tedster made the one im looking for, and i know i replied in the thread, but searching for both our names doesnt produce the goods......must look harder
P.S. I'm finding some other good stuff though!
Web Page Size and Speed [searchengineworld.com]
Download speed - did the whole web forget the 40kb sweet spot? [webmasterworld.com]
Some interesting stuff and it pointed me to Brett's Page Size tool I was horrified to find a text/html ration of 40%. Doesn't seem quite right since the pages I was checking are almost nothing but text.... Yeah, that's what they all say isn't it?
Anyway, I'm going ot play around a bit. I must say that my pages, with graphics and all, were under 30K (often by a lot) and I still like the readibility bonus of neat code. On the other hand, there's no reason to have line breaks within a paragraph.
Food for thought!
Tom