Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #8549

Re: <h2> Odd Behaviour?

From Denis McMahon <denismfmcmahon@gmail.com>
Subject Re: <h2> Odd Behaviour?
Newsgroups alt.html, comp.lang.javascript
References <gqamc7phm92nv5ln9je0cpbgr8f2tddr8l@4ax.com> <4ecba2ce$0$28722$a8266bb1@newsreader.readnews.com> <f69oc7ptj05ej573g48eflaogqmu06as43@4ax.com>
Date 2011-11-23 01:25 +0000
Message-ID <4ecc4b7f$0$28629$a8266bb1@newsreader.readnews.com> (permalink)
Organization readnews.com - News for Geeks and ISPs

Cross-posted to 2 groups.

Show all headers | View raw


On Tue, 22 Nov 2011 14:41:06 -0800, Gene Wirchenko wrote:

> On 22 Nov 2011 13:25:34 GMT, Denis McMahon <denismfmcmahon@gmail.com>
> wrote:
> 
>>On Mon, 21 Nov 2011 21:09:07 -0800, Gene Wirchenko wrote:
>>
>>>      Note the blank line between the "Windows Properties" and "Frames"
>>> lines.  Note that there is no blank line between the "Browser
>>> Properties" and values lines.  Why not?
>>
>>What does this look like:
>>
>>http://www.sined.co.uk/tmp/wirchenko.htm
>>
>>Note that I've wrapped all the text in enclosing block elements i.e.
>><p></ p>. It's a personal preference of mine that text be encapsulated
>>in such block elements, and that they be closed, even if it's not
>>strictly necessary according to the standards. Partly because the first
>>book / tutorial on html that I read back in the mid 90's said it should
>>be done thus, and whether it was right or wrong at the time, and
>>regardless of the fact that it may not matter with some versions, that's
>>still the way I do it.
> 
>      Yes, it works.  I already found that out.  I am wondering if <p>
> tags are compulsory to be sure of correctness.  I am trying to avoid
> cargo-cult programming.

It may be browser dependant, and depend on how each browser handles un-
encapsulated as opposed to encapsulated text wrt stylistic presentation - 
and that might further come down to user preferences.

It's old, but the following explanatory text from the HTML 3.2 
specification at <url:http://www.w3.org/TR/REC-html32-19970114#body> 
might shed light:

"Most elements that can appear in the document body fall into one of two 
groups: block level elements which cause paragraph breaks, and text level 
elements which don't."

This distinction was carried over into section 7.5.3 of the 4.01 
Specification, albeit worded slightly differently:

"By default, block-level elements are formatted differently than inline 
elements. Generally, block-level elements begin on new lines, inline 
elements do not."

Of course, how exactly a browser interprets "begin on a new line" for 
some inline text after a preceding block element (eg a header) is a 
matter for the browser - some might insert a margin relating to the 
previous block element, some might consider that the preceding block 
element implies a new-line after regardless of what follows, others might 
not etc.

Rgds

Denis McMahon

Back to comp.lang.javascript | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

<h2> Odd Behaviour? Gene Wirchenko <genew@ocis.net> - 2011-11-21 21:09 -0800
  Re: <h2> Odd Behaviour? "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2011-11-22 08:42 +0200
    Re: <h2> Odd Behaviour? Gene Wirchenko <genew@ocis.net> - 2011-11-22 14:37 -0800
      Re: <h2> Odd Behaviour? Doug Miller <doug_at_milmacdotcom@example.com> - 2011-11-22 18:06 -0500
      Re: <h2> Odd Behaviour? "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2011-11-23 01:12 +0200
        Re: <h2> Odd Behaviour? Gene Wirchenko <genew@ocis.net> - 2011-11-22 17:19 -0800
          Re: <h2> Odd Behaviour? Doug Miller <doug_at_milmacdotcom@example.com> - 2011-11-22 20:26 -0500
  Re: <h2> Odd Behaviour? Denis McMahon <denismfmcmahon@gmail.com> - 2011-11-22 13:25 +0000
    Re: <h2> Odd Behaviour? Gene Wirchenko <genew@ocis.net> - 2011-11-22 14:41 -0800
      Re: <h2> Odd Behaviour? Denis McMahon <denismfmcmahon@gmail.com> - 2011-11-23 01:25 +0000
        Re: <h2> Odd Behaviour? Swifty <steve.j.swift@gmail.com> - 2011-11-23 05:33 +0000
  Re: <h2> Odd Behaviour? Dr J R Stockton <reply1147@merlyn.demon.co.uk> - 2011-11-23 19:51 +0000

csiph-web