Loading ...
Sorry, an error occurred while loading the content.

RE: [NH] blank line

Expand Messages
  • Grant Mackenzie
    ... No a table can not be contained by a paragraph.(in the strict DTD at least) ... Acceptable but a presentational hacks If you want to explicitly control the
    Message 1 of 9 , Mar 30 3:12 PM
    • 0 Attachment
      > Hi Grant, there are better ways and there are even better ways.
      > Perhaps you can advise me....
      > I'm putting two tables, one beneath the other, and I want a blank line
      > between like so -
      > -------------
      > <table>
      > </table>
      > <p>
      > <table>
      > </table>
      > </p>
      > --------------

      No a table can not be contained by a paragraph.(in the strict DTD at least)

      > -------------
      > <table>
      > </table>
      > <p></p>
      > <table>
      > </table>
      > -------------

      > -------------
      > <table>
      > </table>
      > <p> </p>
      > <table>
      > </table>

      Acceptable but a presentational hacks
      If you want to explicitly control the margin between one block element and
      the next you need to set the margin in a stylesheet declaration
      table
      {
      margin: .5em .5em;
      }

      > OR ?
      > Please explain this ingenious piece of coding -
      >
      > > <p>bla<br />
      > > bla</p>
      > > --------------------------

      A paragraph containing a line break....there is nothing ingenious about it

      block flow elements like div, p, h1 blockquote etc
      will force a line break before and after the content contained by the
      element
      break <br /> is an inline element that will create a line break.
      In the strict DTDs a br must be contained by a block element.

      <p>bla<br /><!--break here-->
      bla</p>


      <p>bla</p>
      <!--a line break after above p and a line break before p below will create
      a whitespace line here-->
      <p>bla</p>

      I suppose it's done this way as html has its origins as a mechanism for
      exchanging academic documents and academic documents are traditionally
      formatted in this way... Anyways if you don't like the default formatting
      style for <p> you can explicitly style p with a stylesheet declaration which
      will override the default.
      Some like below will give you a bookish/magazine type paragraph style

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
      <head>
      <title></title>
      <style type="text/css">
      p
      {
      text-indent: 1em;
      margin: 0em 0em;
      }

      </style>
      </head>
      <body>
      <p>
      data, data, data, data, data, data, data, data, data, data, data, data,
      data, data,
      data, data, data, data, data, data, data, data, data, data, data, data,
      data, data,
      </p>
      <p>
      data, data, data, data, data, data, data, data, data, data, data, data,
      data, data,
      </p>
      </body>
      </html>
    Your message has been successfully submitted and would be delivered to recipients shortly.