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

Re: [NH] Re: Using CSS to space lists & paragraphs

Expand Messages
  • Marcelo de Castro Bastos
    On the last exciting episode, aired on 1/3/2007 16:31, Christine invited ... The problem with is that it s an empty element -- meaning that it doesn t
    Message 1 of 44 , Mar 1 11:45 AM
    • 0 Attachment
      On the last exciting episode, aired on 1/3/2007 16:31, Christine invited
      the wrath of the gods by saying:
      > Many of the documents I have on my site are formatted with <P
      > CLASS="xx"></P>. In between I have used the <BR><BR>. Does this
      > mean I need to go do a find/replace and change those to closing
      > </P>s? If I remember correctly, and based upon what I've NOT read, I
      > can't use classes in a <BR> instrucion, can I?
      >
      >
      The problem with <br> is that it's an empty element -- meaning that it
      doesn't contain anything. I never tried formatting it with CSS (I
      suppose it's possible, some attributes like margin, padding, border and
      such can be applied to other empty elements), but it won't format the
      text of the paragraph.

      <p></p>, on the other hand, is a container element -- meaning that
      anything between the opening and closing tags is contained within it,
      and can be formatted by styles applied to <p>

      I seldom use <br> nowadays, except when I want to force a line break
      inside a paragraph -- for instance, when dealing with poetry: I treat
      each stanza as a paragraph, and use <br> inside it to separate the verses.

      And, anyway, a <br> element outside a container will keep your page from
      validating as STRICT. So it's a good idea to move away from those <br><br>s.

      Marcelo

      -=-=-
      2 + 2 = 4 (for the time being).
      * TagZilla 0.066 on Seamonkey 1.1
    • Scott Fordin
      ... For better or worse, HTML has become more of a de facto formatting language rather than a structure-oriented markup language. The DTD is lax enough that
      Message 44 of 44 , Mar 9 8:51 AM
      • 0 Attachment
        absalom_nemini wrote:
        > I have to admit to being appalled. From LaTeX I had expected the
        > following snippet to give visible results:
        >
        > <P>
        > And he said:<BR>
        > <CITE>There is a word here needing to be <EM>emphasized</EM>
        > regardless of context.</CITE><BR>
        > <B>A sentiment to which I <STRONG>strongly</STRONG> agree.</B>
        > </P>

        For better or worse, HTML has become more of a de facto formatting
        language rather than a structure-oriented markup language. The DTD
        is lax enough that you can get away with all sorts of illogical
        structuring schemes -- for example, the hierarchy of heading tags
        (h1, h2, h3, etc.) is not enforced. On the one hand, it's made it
        easy for millions of pages to be written by non-coding types,
        giving us all sorts of wonderful stuff that probably wouldn't
        occur to the aforementioned coding types. On the other hand, it's
        created all sorts of issues around browser compatibility, made it
        very difficult to programmatically port or integrate markup in
        other pages or web-based applications, and has engendered page
        design horror shows analogous to the multifont, carny colored
        nightmares we saw in the early days of Apple and Mac page layout
        programs... the digital equivalents of purple shag carpeting and
        cheesy faux-wood basement paneling!

        As a telling example, note that converting SGML->HTML is generally
        a straightforward process, whereas all bets are off when converting
        HTML->SGML. In some ways, we're starting to see the code hit the
        fan with the rise of XML, XHTML, PHP coding models, which are
        usually more strict (depending on your DTD), and are now learning
        how it's often really painful to suck existing HTML pages in to
        new content structures.

        This said, one reason I generally prefer structural markup to
        physical markup is that it makes it potentially easier to
        repurpose content for things I haven't even anticipated yet --
        and I'm just vain enough to hope that some of my old pages might
        find their ways into these new content models!

        Scott
        (Coding sermonette #3746.12)
      Your message has been successfully submitted and would be delivered to recipients shortly.