Prev: textarea wrap
Next: Image and Text Side By Side
From: Spartanicus on 9 Sep 2006 03:58 "Jukka K. Korpela" <jkorpela(a)cs.tut.fi> wrote: >>> If you describe the circumstance, some advice could be given. Such as >>> "put it in a <div> ..." >> >> But "some .. element" should be "some semantic element", that excludes >> <div>. > >Should it? Always, if the content as per the OP is text (or an element who's non replaced content is text). >Even under the circumstances that HTML has a rather limited >repertoire of semantic elements? Quite often, the choice is between a >non-semantic element (<div> or <span>) and a semantically _wrong_ element, >such as abusing <p> for something that ain't no paragraph. > >From the CSS viewpoint, using semantically wrong elements has the practical >drawback that they may come with default property values that have been >designed with the correct semantics in mind. If you use <p> for >representing, say, a short copyright notice (<p>© 2006 John Doe</p>), >you have to worry about the default top and bottom margin, or perhaps >default padding. Using <div>, you can pretty safely expect no default >rendering specialties: the <div> element is rendered as a block, normally >with no margins or padding. (The HTML specifications even say this >relatively clearly, though not explicitly in CSS terms.) So you can just >start _adding_ the styling you wish. For a copyright notice, rendering with a top margin is appropriate for non CSS rendering situations. Renderings other than a visual rendering should be considered. A paragraph should render with a leading and trailing pause in the audio domain, this is required here. If no other suitable markup like <li>, <hx> etc. should be used, I've not yet encountered "loose" text content for which paragraph markup wasn't appropriate. The dictionary definition of "paragraph" should IMO not be applied strictly. The semantic distinction between a "real" paragraph and short text like a copyright notice is IMO not relevant from any angle. The next function of markup is IMO functionality, for this paragraph markup is appropriate for all cases of "loose" text that I've encountered. -- Spartanicus
From: Jukka K. Korpela on 9 Sep 2006 06:24 Spartanicus <invalid(a)invalid.invalid> scripsit: > For a copyright notice, rendering with a top margin is appropriate for > non CSS rendering situations. If you have, say, a collection of miscellaneous notes at the bottom of a page - the typical context of a copyright notice -, such rendering would look rather foolish. > Renderings other than a visual rendering > should be considered. A paragraph should render with a leading and > trailing pause in the audio domain, this is required here. No it isn't. Who wants such pauses between various fairly irrelevant final notes? > If no other suitable markup like <li>, <hx> etc. should be used, I've > not yet encountered "loose" text content for which paragraph markup > wasn't appropriate. That's just because you _don't_ use paragraph markup semantically. > The dictionary definition of "paragraph" should > IMO not be applied strictly. That's the common poor excuse that people present when they use markup (or terms or whatever) so loosely that they have no real meaning any more. What you are saying is that you do not care about what "paragraph" means in normal English, which is what the semantic definition of <p> in HTML specifications refers to. You just try to obscure this by throwing in dictionaries and "strictness". That's like saying that we do not apply strictly the dictionary definition of "black" but use the word liberally and progressively (so that it includes white if convenient). > The semantic distinction between a "real" > paragraph and short text like a copyright notice is IMO not relevant > from any angle. Now that's a yet another attempt at confusing things, and if you really believed in what you previously wrote (effectively saying that a short copyright notice _is_ a paragraph), you would not have resorted to that lame excuse. You are now saying that a semantic distinction is "not relevant from any angle", so why do you say that we should use semantic markup for everything? You have just turned <p> into <div> in disguise - into a general block element. You just lost the semantics included into the use of <p> as per the specifications. If you want the _best_ excuse for that, it's this: "p" is two characters shorter than "div". -- Jukka K. Korpela ("Yucca") http://www.cs.tut.fi/~jkorpela/
From: Beauregard T. Shagnasty on 9 Sep 2006 09:03 Spartanicus wrote: > "Beauregard T. Shagnasty" <a.nony.mous(a)example.invalid> wrote: > >>> Is there a way to use CSS to format "plain" text in an html >>> document. By plain I mean text which is not contained by <p> or >>> <h#> tags. >> >> If you are using a Strict DOCTYPE, there should be no text outside >> of .. some .. element. Transitional will let you get away with it, >> but it is poor practice to do so. You lose semantic meaning if you >> do that. > > Indeed. > >> If you describe the circumstance, some advice could be given. Such as >> "put it in a <div> ..." > > But "some .. element" should be "some semantic element", that > excludes <div>. You and Jukka have covered all the bases. I said what I said (note that I did mention semantics), because we at this point don't know what the OP's "plain text" really is. It may itself have no semantic meaning, and may just be some sort of "decoration." -- -bts -Motorcycles defy gravity; cars just suck.
From: Spartanicus on 9 Sep 2006 09:15 "Jukka K. Korpela" <jkorpela(a)cs.tut.fi> wrote: >> For a copyright notice, rendering with a top margin is appropriate for >> non CSS rendering situations. > >If you have, say, a collection of miscellaneous notes at the bottom of a >page - the typical context of a copyright notice -, such rendering would >look rather foolish. I'm having difficulty imagining what content and structure you are alluding to, please provide an example. I consider the following to be best practice markup, with an appropriate example styling: http://homepage.ntlworld.ie/spartanicus/copyright_structure.htm If not itself marked up as a paragraph, the copyright text could render flush to the preceding paragraph (depending on the styling defaults of a visual client), with the possibility that the line break may be obscured resulting in no way to distinguish it from the preceding paragraph, demo: http://homepage.ntlworld.ie/spartanicus/div_copyright.png Using paragraph markup for the copyright text should ensure that it will always be rendered distinct from preceding semantically marked up content (excluding daft browser defaults or things like daft user CSS). Btw, the screenshot is from a reputable client with unmodified default rendering. >> If no other suitable markup like <li>, <hx> etc. should be used, I've >> not yet encountered "loose" text content for which paragraph markup >> wasn't appropriate. > >That's just because you _don't_ use paragraph markup semantically. Correct, I use markup functionally since there is no benefit in making a semantic distinction between short text and a paragraph, even if we had a semantic element for structural short text. Ideally markup should accurately reflect the content, but since we have quite limited options within the confines of HTML4, and because there is no benefit from distinguishing between structural short text and a paragraph I look at what purposes markup should provide other than to reflect the semantics. Paragraph markup provides structure, and unlike the semantic distinction between a paragraph and short text, this structure provides for an actual need. The idea that paragraph markup should not be used for short texts assumes that a clear distinction can be made between the two, this is obviously not the case, and therefore alone not a viable position. -- Spartanicus
From: Michael Bulatovich on 9 Sep 2006 10:37
Thanks Mr. Shagnasty, Jukka, and others. I think you've covered it. The text to which I referred could be within <body> tags, but not otherwise contained by what I would recognize as typical selectors for text (h#, p, blockquote, etc.) If I understand correctly, it sounds like this sort of thing could be influenced by using the body as selector. "Beauregard T. Shagnasty" <a.nony.mous(a)example.invalid> wrote in message news:RYyMg.88475$5i3.77397(a)bgtnsc04-news.ops.worldnet.att.net... > Spartanicus wrote: > >> "Beauregard T. Shagnasty" <a.nony.mous(a)example.invalid> wrote: >> >>>> Is there a way to use CSS to format "plain" text in an html >>>> document. By plain I mean text which is not contained by <p> or >>>> <h#> tags. >>> >>> If you are using a Strict DOCTYPE, there should be no text outside >>> of .. some .. element. Transitional will let you get away with it, >>> but it is poor practice to do so. You lose semantic meaning if you >>> do that. >> >> Indeed. >> >>> If you describe the circumstance, some advice could be given. Such as >>> "put it in a <div> ..." >> >> But "some .. element" should be "some semantic element", that >> excludes <div>. > > You and Jukka have covered all the bases. I said what I said (note that > I did mention semantics), because we at this point don't know what the > OP's "plain text" really is. It may itself have no semantic meaning, and > may just be some sort of "decoration." > > -- > -bts > -Motorcycles defy gravity; cars just suck. |