Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Re: Slightly ugly output

Reply
Thread Tools

Re: Slightly ugly output

 
 
Neredbojias
Guest
Posts: n/a
 
      08-06-2010
On 05 Aug 2010, "rf" <(E-Mail Removed)> wrote:

>
> "rf" <(E-Mail Removed)> wrote in message
> news:SKH6o.2654$(E-Mail Removed) nd.com...
>>
>> "lrhorer" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> Sherm Pendley wrote:
>>>
>>>>> the !DOCTYPE declaration as the *SECOND* HTML line, after the
>>>>> Content marker. Everything I read was telling me to place it as
>>>>> the first line.
>>>>
>>>> What you've read is correct. The !DOCTYPE belongs on the first
>>>> line, always, no exceptions.
>>>
>>> If I do that, then it won't run at all, always, no
>>> exceptions. If
>>> the
>>> HTTP header does not precede every other HTML line, then the web
>>> server will barf on the file. If the first line of the file is not
>>>
>>> #! /bin/bash
>>>
>>> (or some other valid shell), then the file won't run at all.
>>>
>>>>>> carefully reproduce all the bugs it has had back to version 5.5.
>>>>>> It usually means all bets are off as far as cross browser
>>>>>> consistent layout of your page is concerned.
>>>>>
>>>>> Since I'm only using one browser, I really couldn't care
>>>>> much less
>>>>> about that, either.
>>>>
>>>> Okay, but *this group* does care. If you want bad advice that only
>>>> works in one browser, you'll need to go somewhere else to find it.
>>>
>>> So instead, I should take advice like that above, which
>>> won't work
>>> with
>>> any browser? I didn't ask for advice setting up my headers.
>>> Indeed, looking at your responses in this thread, I don't see any
>>> useful advice whatsoever, only criticisms. Perhaps in the past you
>>> have offered real advice, but one cannot judge that to be the case
>>> by your responses in this thread. Presuming this forum is indeed
>>> intended to be devoted to offering helpful advice, perhaps I am not
>>> the one who should seek another forum?

>>
>> You are confused, and it's not Sherms fault.
>>
>> Read my other post again. We are not talkinging about HTTP headers
>> here. We are talking about HTML.
>>
>> Doctype is part of the HTML, not the HTTP headers.
>>
>> Doctype must be the first line of the *HTML*.

>
>
> Damn
>
> [HTTP headers]
> [one blank line]
> [HTML]
>
> where [HTML] looks similar to
> <!DOCTYPE ...
> <html>
> <head>
> ...


What's with the blank line? If a "blank line" appears before the
doctype (which it would with eg:

<?php $epithet="bitemynuggets"; ?>

<!~DOCTYPE="html">)

....then some browsers will screw it up.

--
Neredbojias

http://www.neredbojias.org/
http://www.neredbojias.net/
 
Reply With Quote
 
 
 
 
Denis McMahon
Guest
Posts: n/a
 
      08-06-2010
On 06/08/10 01:24, Neredbojias wrote:
> On 05 Aug 2010, "rf" <(E-Mail Removed)> wrote:
>
>>
>> "rf" <(E-Mail Removed)> wrote in message
>> news:SKH6o.2654$(E-Mail Removed) nd.com...
>>>
>>> "lrhorer" <(E-Mail Removed)> wrote in message
>>> news:(E-Mail Removed)...
>>>> Sherm Pendley wrote:
>>>>
>>>>>> the !DOCTYPE declaration as the *SECOND* HTML line, after the
>>>>>> Content marker. Everything I read was telling me to place it as
>>>>>> the first line.
>>>>>
>>>>> What you've read is correct. The !DOCTYPE belongs on the first
>>>>> line, always, no exceptions.
>>>>
>>>> If I do that, then it won't run at all, always, no
>>>> exceptions. If
>>>> the
>>>> HTTP header does not precede every other HTML line, then the web
>>>> server will barf on the file. If the first line of the file is not
>>>>
>>>> #! /bin/bash
>>>>
>>>> (or some other valid shell), then the file won't run at all.
>>>>
>>>>>>> carefully reproduce all the bugs it has had back to version 5.5.
>>>>>>> It usually means all bets are off as far as cross browser
>>>>>>> consistent layout of your page is concerned.
>>>>>>
>>>>>> Since I'm only using one browser, I really couldn't care
>>>>>> much less
>>>>>> about that, either.
>>>>>
>>>>> Okay, but *this group* does care. If you want bad advice that only
>>>>> works in one browser, you'll need to go somewhere else to find it.
>>>>
>>>> So instead, I should take advice like that above, which
>>>> won't work
>>>> with
>>>> any browser? I didn't ask for advice setting up my headers.
>>>> Indeed, looking at your responses in this thread, I don't see any
>>>> useful advice whatsoever, only criticisms. Perhaps in the past you
>>>> have offered real advice, but one cannot judge that to be the case
>>>> by your responses in this thread. Presuming this forum is indeed
>>>> intended to be devoted to offering helpful advice, perhaps I am not
>>>> the one who should seek another forum?
>>>
>>> You are confused, and it's not Sherms fault.
>>>
>>> Read my other post again. We are not talkinging about HTTP headers
>>> here. We are talking about HTML.
>>>
>>> Doctype is part of the HTML, not the HTTP headers.
>>>
>>> Doctype must be the first line of the *HTML*.

>>
>>
>> Damn
>>
>> [HTTP headers]
>> [one blank line]
>> [HTML]
>>
>> where [HTML] looks similar to
>> <!DOCTYPE ...
>> <html>
>> <head>
>> ...

>
> What's with the blank line? If a "blank line" appears before the
> doctype (which it would with eg:
>
> <?php $epithet="bitemynuggets"; ?>
>
> <!~DOCTYPE="html">)
>
> ...then some browsers will screw it up.


No, you need a single blank line between the http headers and the start
of html.

It's how the protocol signals that the http headers have finished and
that what follows is the html code (or other content).

Rgds

Denis McMahon
 
Reply With Quote
 
 
 
 
rf
Guest
Posts: n/a
 
      08-06-2010

"Neredbojias" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) .net...
> On 05 Aug 2010, "rf" <(E-Mail Removed)> wrote:
>
>>
>> "rf" <(E-Mail Removed)> wrote in message
>> news:SKH6o.2654$(E-Mail Removed) nd.com...


>> [HTTP headers]
>> [one blank line]
>> [HTML]
>>
>> where [HTML] looks similar to
>> <!DOCTYPE ...
>> <html>
>> <head>
>> ...

>
> What's with the blank line?


The blank line is part of the HTTP headers. It acts as an "end of headers".

What *follows* the blank line is the payload of the HTTP message, in this
case an HTML page.


 
Reply With Quote
 
Neredbojias
Guest
Posts: n/a
 
      08-06-2010
On 05 Aug 2010, Denis McMahon <(E-Mail Removed)> wrote:


>>>> You are confused, and it's not Sherms fault.
>>>>
>>>> Read my other post again. We are not talkinging about HTTP headers
>>>> here. We are talking about HTML.
>>>>
>>>> Doctype is part of the HTML, not the HTTP headers.
>>>>
>>>> Doctype must be the first line of the *HTML*.
>>>
>>>
>>> Damn
>>>
>>> [HTTP headers]
>>> [one blank line]
>>> [HTML]
>>>
>>> where [HTML] looks similar to
>>> <!DOCTYPE ...
>>> <html>
>>> <head>
>>> ...

>>
>> What's with the blank line? If a "blank line" appears before the
>> doctype (which it would with eg:
>>
>> <?php $epithet="bitemynuggets"; ?>
>>
>> <!~DOCTYPE="html">)
>>
>> ...then some browsers will screw it up.

>
> No, you need a single blank line between the http headers and the
> start of html.
>
> It's how the protocol signals that the http headers have finished and
> that what follows is the html code (or other content).


Well I'll be hornswaggled!

--
Neredbojias

http://www.neredbojias.org/
http://www.neredbojias.net/
 
Reply With Quote
 
Neredbojias
Guest
Posts: n/a
 
      08-06-2010
On 05 Aug 2010, "rf" <(E-Mail Removed)> wrote:

>
> "Neredbojias" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) .net...
>> On 05 Aug 2010, "rf" <(E-Mail Removed)> wrote:
>>
>>>
>>> "rf" <(E-Mail Removed)> wrote in message
>>> news:SKH6o.2654$(E-Mail Removed) nd.com...

>
>>> [HTTP headers]
>>> [one blank line]
>>> [HTML]
>>>
>>> where [HTML] looks similar to
>>> <!DOCTYPE ...
>>> <html>
>>> <head>
>>> ...

>>
>> What's with the blank line?

>
> The blank line is part of the HTTP headers. It acts as an "end of
> headers".
>
> What *follows* the blank line is the payload of the HTTP message, in
> this case an HTML page.


Well I'll be a monkey's uncle!

--
Neredbojias

http://www.neredbojias.org/
http://www.neredbojias.net/
 
Reply With Quote
 
Neredbojias
Guest
Posts: n/a
 
      08-06-2010
On 05 Aug 2010, Sherm Pendley <(E-Mail Removed)> wrote:

> Neredbojias <(E-Mail Removed)> writes:
>
>> On 05 Aug 2010, "rf" <(E-Mail Removed)> wrote:
>>
>>> [HTTP headers]
>>> [one blank line]
>>> [HTML]
>>>
>>> where [HTML] looks similar to
>>> <!DOCTYPE ...
>>> <html>
>>> <head>
>>> ...

>>
>> What's with the blank line?

>
> A blank line signals the end of the HTTP headers; everything after
> that is part of the HTML (or other) document content.
>
>> If a "blank line" appears before the
>> doctype (which it would with eg:
>>
>> <?php $epithet="bitemynuggets"; ?>
>>
>> <!~DOCTYPE="html">)
>>
>> ...then some browsers will screw it up.

>
> Yes, any additional blank lines that are sent in addition to the one
> that's required will be parsed as part of the HTML document. As the
> Highlander says, there can be only one.


Well I'll be dipped in spit!

--
Neredbojias

http://www.neredbojias.org/
http://www.neredbojias.net/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Slightly ugly output Andy HTML 11 08-04-2010 04:34 AM
Re: Slightly ugly output Denis McMahon HTML 2 08-02-2010 01:40 PM
get output of du / ls command - currently ugly code ... Esmail Python 2 08-13-2009 08:13 PM
The UGLY output from P&S superzooms Rich Digital Photography 34 12-23-2007 09:30 AM
Mozilla Firebird 0.7 has ugly font Nick de Graeve Firefox 1 02-03-2004 05:56 PM



Advertisments