Google Mail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion inline vs. block
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Follow-up To:
Add Cc | Add Follow-up to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers that you hear
 
Andy Dingley  
View profile   Translate to Translated (View Original)
 More options 30 Mar 2006, 02:08
Newsgroups: alt.html
From: Andy Dingley <ding...@codesmiths.com>
Date: Thu, 30 Mar 2006 02:08:04 +0100
Local: Thurs 30 Mar 2006 02:08
Subject: Re: inline vs. block
On Wed, 29 Mar 2006 21:40:44 +0100, David Dorward <dorw...@yahoo.com>
wrote:

>Stan McCann wrote:

>> How is a novice to tell the difference between an inline and block
>> level element?

Read the DTD

<!ENTITY % special
   "A | IMG | OBJECT | BR | SCRIPT | MAP | Q | SUB | SUP | SPAN | BDO">

<!-- %inline; covers inline or "text-level" elements -->
<!ENTITY % inline "#PCDATA | %fontstyle; | %phrase; | %special; |
%formctrl;">

These have told us that SPAN is a member (indirectly) of %inline;

The following tells us that the content model _inside_ SPAN is also
%inline;

<!ELEMENT SPAN - - (%inline;)*         -- generic language/style
container -->
<!ATTLIST SPAN
  %attrs;                              -- %coreattrs, %i18n, %events --
  %reserved;                   -- reserved for possible future use --
  >

For P we see that it's %block;, but that its content model is %inline;

<!ENTITY % block
     "P | %heading; | %list; | %preformatted; | DL | DIV | NOSCRIPT |
      BLOCKQUOTE | FORM | HR | TABLE | FIELDSET | ADDRESS">

<!ELEMENT P - O (%inline;)*            -- paragraph -->
<!ATTLIST P
  %attrs;                              -- %coreattrs, %i18n, %events --
  >

>The basic difference is that blocks have a line break before and after them,
>while inline flow beside each other and word wrap.

No, this is incorrect. That's the default CSS behaviour of the element
(confusingly also called "block" and "inline" which is not the same as
the HTML  content model that control valid nesting.

We can change the CSS behavious at will with the display property. We're
stuck with the HTML DTD though.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google