SitePoint Sponsor

User Tag List

Page 1 of 6 12345 ... LastLast
Results 1 to 25 of 148
  1. #1
    Non-Member
    Join Date
    Jun 2010
    Location
    4727′35″N 2618′0″E
    Posts
    1,789
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    HTML 4.01 Transitional DTD is the answer?

    i just want to lay down a little thing that bugs me. this thread (among others by AutisticCuckoo) provides us with healthy knowledge. i want to say thanks to the author again. he has done a great job laying down crystal clear facts for us.

    in this thread, there are two paragraphs:

    The HTML 4.01 Strict DTD emphasises the separation of content from presentation and behaviour. This is the DTD that the W3C recommend for all new documents.
    The HTML 4.01 Transitional DTD is meant to be used transitionally when converting an old-school (pre-HTML4) document into modern markup. It is not intended to be used for creating new documents.
    i want to ask this:

    even if we respect DTD for HTML 4.01 Strict in writing the code for a web page, the moment we start adding elements only as presentational hooks, like div, span, or any other element for that matter, but solely for the sake of presentation, just to be targeted later on with css (rounded corners techniques and others alike), aren't we, in fact, writing a HTML 4.01 Transitional DTD web page? even if we don't use those "11 presentational element types and a plethora of presentational attributes that are deprecated in the Strict DTD", isn't our code in fact describing a Transitional DTD?

    going further on with this thought, isn't this also affecting XHTML world the same way? with all that strictness, the moment an XHTML markup is polluted with divs and spans as presentational hooks, then can it really even be called on as XHTML? not technically speaking, of course, but as a concept, is it still holding it's meaning?

  2. #2
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    It is still STRICT assuming it passes the criteria of legal elements and attributes, etc. Obviously it may score badly with regards to semantics if you decide that you want to position with TABLE and BLOCKQUOTE. And likewise then probably you begin missing the whole point of (x)html in the first place (being a Structural markup language) but nonetheless still Strict.

    I assume what you are meaning is; quite a lot of people make superfluous use of the DIV and SPAN elements, which are designed to be mainly, generic style hooks. When we talk of presentational tags; b, big, hr, i, small, sub, sup, tt are common examples.

    Well, blatantly misusing the elements as you rightly said is probably counter-productive though in some instances a few additional DIV elements don't matter too much... If you make sure all CSS is external to the file and they aren't being misused for example in place of a Paragraph or H2 then the damage lessens.

    Yes, you can conclude just because a page is 'Valid Strict' doesn't necessarily mean it will be better written than a 'Valid Transitional'. Although it does theoretically limit the use of [some] 'presentational' tags/attributes but not the MISUSE of elements for presentational purpose.

  3. #3
    Non-Member
    Join Date
    Jun 2010
    Location
    4727′35″N 2618′0″E
    Posts
    1,789
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    for me a more logical way would be the following: the moment you need/have/choose to start "murdering" the markup with elements having presentational hook as their sole purpose, you then need to change your DTD, from Strict to Transitional.

    using divs or spans to give structure to the document, that i believe it's ok. using divs and spans as hooks for simple presentational feats i believe it's ok still. things are changing the moment you begin adding divs and spans for rounded corners or image replacement techniques. it's too much, and your pretending to separate the content and presentation is already gone out the window. then i believe it's time to change your DTD from strict to transitional. that will help you seek to improve your code 'till it's worthy of being a strict and it will keep you looking forward to the day you can adopt techniques for those feats that are not defeating the strict meaning.

  4. #4
    Mouse catcher silver trophy Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,888
    Mentioned
    122 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by noonnope View Post
    even if we respect DTD for HTML 4.01 Strict in writing the code for a web page, the moment we start adding elements only as presentational hooks, like div, span, or any other element for that matter, but solely for the sake of presentation, just to be targeted later on with css (rounded corners techniques and others alike), aren't we, in fact, writing a HTML 4.01 Transitional DTD web page? even if we don't use those "11 presentational element types and a plethora of presentational attributes that are deprecated in the Strict DTD", isn't our code in fact describing a Transitional DTD?
    Nope. A page can be HTML 4.01 Strict if it avoids using presentational elements, because elements such as <font> and <center> are tying a particular presentation to the document that doesn't have any semantic meaning. That isn't the case for <div> and <span>, which don't have any effect on their own. The whole point of HTML Strict is to separate content from presentation, and <div> and <span> do that admirably - by providing a generic hook for whatever styling you want to subsequently hang on it. It's hard to imagine any visual web page that doesn't need any <div> or <span> and can manage entirely with semantic elements.

  5. #5
    Non-Member
    Join Date
    Jun 2010
    Location
    4727′35″N 2618′0″E
    Posts
    1,789
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i never argued about the technicality of it. if you use strict markup, you are bound to a number of specific rules regarding this markup and, at least apparently, you have a strict. and this rules are laid down in an admirably and concise way by AutisticCuckoo, right here, on this forum. no need to restate the differences between strict and transitional.

    but the real meaning of strict is the protection of markup regarding meaningful content. if you can't do that, you've failed it's purpose. using excessive divs and spans with a somewhat useless presentational goal, one pollutes this very markup, breaking the separation of content and presentation goal. so you're back to transitional. maybe not because of <font>, but nevertheless.

    It's hard to imagine any visual web page that doesn't need any <div> or <span> and can manage entirely with semantic elements.
    i'm not saying: forget divs and spans as presentational hooks. oh no, and have never said that. even more so, i support the natural use of them:
    using divs or spans to give structure to the document, that i believe it's ok. using divs and spans as hooks for simple presentational feats i believe it's ok still.
    but the abuse that comes with some techniques, like some rounded corners by the use of images, or some image replacement techniques, it's gone way beyond a normal acceptable healthy use. and because of that, the markup only technically respects the strict definition. in fact now it has become a markup mixing up elements used for content with elements used STRICTLY AND UNNECESSARILY (as far as the content is concerned) for presentation. and that makes it a transitional and therefore i think it should be labeled as such. even if it validates as strict.

    basically, what i'm saying is this:
    -if one uses semantically neutral elements like div and span for the use of the actual content, that still qualifies as strict.
    - if one is going to abuse a strict only to achieve some presentational feats like rounded corners with images or others like that, feats that are making a heavy use of unnecessary (when it comes to actual content) elements, one should be honest about his intentions and change the DTD to transitional.

  6. #6
    Non-Member
    Join Date
    Jun 2010
    Location
    4727′35″N 2618′0″E
    Posts
    1,789
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    what stands between strict and transitional is the separation of content from presentation. this has lead towards the deprecation of some elements. not the other way around, which is that the deprecation of some elements has given birth to strict. not using those deprecated elements is not the only single rule that is going to make a strict out of a transitional.

    so if you are using elements for presentational feats only, that have nothing whatsoever to do with the structure or the presentation of the actual content (no matter what elements are those), your document may validate as strict (and that can happen also with a lot of openly declared transitional documents), but it really means transitional. it's (hopefully) still looking for a way to ditch those elements used only for presentation outside the content point of view. so why lie? why deprave strict's good name?

    this misunderstanding and misuse i believe has had a bad influence over the current html5 draft.

  7. #7
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,840
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    The transitional doctype is there simply to allow web pages originally written usiing HTML 3.2 to be transitioned to use HTML 4.

    If you use a transitional doctype it means your page still contains HTML 3.2 elements that were found to cause issued and which were therefore removed from HTML 4.

    The problem with having written pages that use HTML 3.2 is that it can take many years to find the time to clean up the HTML in order to remove that garbage and gain the full flexibility that HTML 4 offers. That's why most of the web is still stuck using HTML 3.2. In fact rather than fix their pages a lot of people have decided to just live with all those problems and have added some of the garbage back into the HTML 5 standard instead. That way they can be fully up to date with their stone age coding.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  8. #8
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by noonnope View Post
    even if we respect DTD for HTML 4.01 Strict in writing the code for a web page, the moment we start adding elements only as presentational hooks, like div, span, or any other element for that matter, but solely for the sake of presentation, just to be targeted later on with css (rounded corners techniques and others alike), aren't we, in fact, writing a HTML 4.01 Transitional DTD web page?
    I understand what you're saying (I think), but I'll say that the answer in the general case is no.

    Firstly, from a stricly technical point of view, we're not straying from the Strict DTD to the Presentational DTD unless we use any of the element types or attributes that are included in the latter but deprecated in the former.

    But are we using presentational markup in a way that is counter to the original ideals for HTML? Yes, we are. It's currently unavoidable due to the limited means that CSS2.1 provides for controlling layout and for adding decorational flourishes. (Well, to be honest, the lack of browser support for the features that do exist is even more limiting.)

    Adding one or two wrapping divs around blocks of content is nothing that should make the Semantics S.W.A.T. Team come crashing through our windows at night. That's just content grouping, which is one of the purposes of the div element type. As long as we don't go overboard and create the deeply nested horrors that gives deathshadow60 an apoplectic fit, we're fine.

    Using empty elements to create 'hooks' for styling is less acceptable, but unfortunately necessary for some types of design. This should peter out by itself eventually, with the arrival of CSS3's border-radius, multiple background images, etc. And, of course, the gradual disappearance of non-CSS2 browsers like IE7 that don't support the ::before and ::after pseudo-elements.

    Then there is another practice that I don't hesitate to call despicable: abusing element types with specified semantics for ulterior purposes. The classic example of this, of course, is abusing tables for layout purposes of non-tabular information. Using blockquote to indent text is another. These practices are becoming increasingly rare among (true) professionals, though.

    But and here is probably where a larger group of people will begin to disagree with me in earnest there are more subtle practices that are getting more and more common, even among those who really should know better. I'm talking about wrapping pairs of labels and input fields in paragraph tags to 'avoid divitis'. I'm talking about marking up forms (in general) using ordered or unordered lists, or even definition lists. I'm calling this hypersemantics, analogous with hypercorrection.
    Birnam wood is come to Dunsinane

  9. #9
    Non-Member bronze trophy
    Join Date
    Nov 2009
    Location
    Keene, NH
    Posts
    3,760
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    I could agree with that except it's based on false assumptions and reads WAY too much meaning into the specification; To the point of stuffing words in it's mouth that have nothing to do with the POINT of semantic markup, separation of presentation from content, or HTML STRICT.

    As AutisticCuckoo said, if CSS 2.1 - the most recent version that is real-world deployable, wasn't as lacking in capabilities we'd not need a lot of those extra wrappers... but that's just the tip of the iceberg.

    More importantly, DIV and SPAN are semantically neutral containers for WHEN there is no better semantic tag but you still need to target it. We would either need to not apply styling the developer may want to just because we have no perfectly matched-up meaning, abuse existing tags (like the jokers wrapping DL's around LABELS and INPUTS), or worst of all require dozens more semantic tags to even scratch the surface of what we need to do turning the specification into a bloated mess like HTML5 is trying to do. When people can't even bother learning how to use numbered headings or tags like LEGEND, FIELDSET, TH, CAPTION or LABEL, or even make the distinction between a presentational image and a content image -- adding more tags to the specification is not the answer when people can't even keep the difference between an abbreviation and an acronym straight. (that some jackass started saying it was ok to put some acronyms in as abbreviations didn't help, much less the abuse of the tag by the microformats nutzo's)

    That's really the most important part about those tags and why it's ok to use them as hooks; Semantic neutrality. They apply NO NEW MEANING to any content they surround... so when styling is off they have NO effect. That's a good thing and the reason to use them.

    One detail of semantics people constantly miss: It's not just about slapping meaningful containers around content, it's also knowing when NOT to slap containers with meanings around the WRONG content. Again, you see a definition list around labels and inputs (or worse with no labels at all), paragraphs around lone image tags, paragraphs around a two word blob of text that's not part of an article or even paragraph tags around text inside a LI; That's not semantic markup, that's tag abuse.

    For example, if you had a image plate with associated text, the border and float you apply to both for screen is NOT part of the content, but you still need a hook to wrap both. DIV allows you to do so without changing their meaning -- since it doesn't imply a meaning to them, it's still semantic while giving you your hook.

    Back to rounded corners, you need two elements to do a sliding doors before it; what are you going to use to do it? You can't do it without the extra elements -- so you use elements that apply no extra meaning to the page PRESERVING your semantic markup without implying any extra meaning.

    While presentational tags, the ones removed in strict like FONT, CENTER, etc, imply a meaning, or at least an appearance.

    That I think is what you are failing to grasp; DIV and SPAN all on their own, apart from DIV being block-level applies NO meaning OR appearance to the content it wraps. PERIOD. Which means that with media types you can use that hook to say "left" for screen, "centered" for handheld and "right" for print. That is what the separation of presentation from content and deprecation of presentational tags is about.

    It's NOT to get rid of presentational HOOKS, it's to get rid of PRESENTATION. There's a difference. You still need the hooks to apply CSS TO. You just want those hooks NOT to say all by themselves what that presentation actually IS.

    Part of why I consider presentational classnames like "left", "smalltext" or "width960" to be as big a steaming pile of /FAIL/ as still using HTML 3.2... or a tranny doctype for that matter... Since I suddenly want to be able to have my back-end switch from RTL to LTR capability I don't want to have to go through and change every "left" to "right" in the markup when I could just change the CSS and leave the markup alone... or to reskin from a fixed 960 width to semi-fluid or totally fluid.

    Markup is for saying what things are, and any hooks you need to apply styling (and IMHO WHY/WHAT), CSS is for saying what that appearance actually IS.

    A DIV with a class on it doesn't actually apply appearance, the CSS does; and the CSS can apply any appearance to it - so it has no impact on the semantics of the rest of the page or on it's appearance when CSS is not present if you use them properly or in a logical fashion. Same actually goes for empty tags - if there's no content, there's nothing for the tag to apply meaning to, letting you often squeeze in some appearance without resorting to bloating out the markup and CSS with more classes. (see the use of B or I, which also apply no semantic meaning unlike STRONG and EM)

    Quote Originally Posted by noonnope View Post
    with all that strictness, the moment an XHTML markup is polluted with divs and spans as presentational hooks, then can it really even be called on as XHTML?
    XHTML, at least in the 1.0 version (the only real world deployable one) simply exists to map the HTML 4 specification to a XML namespace. There is no reason for neutral tags to have any effect on if it's valid XML or not; well, unless you get inline-level and block-level confused and end up with a malformed document. (which people who forget the difference and which tags are which do screw up all the time).

    Simply using div's, even empty ones, has no impact on if it's valid XML or not; NOR would it EVER have an impact on XHTML 1.0

    Now 1.1, that's a different story, but given the total disaster that turned into and that the whole 'XML application' garbage doesn't do anything I'd want to see done on a web page, who cares?

    If you're gonna rage every time you see a DIV or SPAN used as a presentational hook in a strict document, you not only missed the point of STRICT, you aren't going to get very far as a developer.

    The point being, DIV does not apply presentation (apart from the block level behavior, which does nothing if it's surrounded by other block level containers or the content is in other block level containers like headings or P) -- CSS does. It implies no meaning whatsoever to the content it wraps in and of itself. As such, the presentation is not in the markup no matter how many DIV you use.

    Unlike say... CENTER, FONT, STRIKE, UNDERLINE

    Though I would also point out that STRICT is NOT just about removing presentation - that's not it's entire focus even though many people falsely claim it is - it's just PART of it.

    Look at some of the other tags and attributes deprecated: iframe, frameset, frames, noframes, target -- that's all accessibility related since those are a miserable accessibility /FAIL/ - as such you shouldn't be using any of them. Frames not only didn't work in less capable browsers or be handled well by things like screen readers, how do you link someone to the content of a frame; by hiding the URL it prevented content linking (see why AJAX tabs are a accessibility train wreck), they are easily abused for cross site exploits... and things like TARGET let you override the default behavior of a anchor and even normal site navigation; see target="_blank" -- one shouldn't be shoving opening a window down the users throat, they want it in a new window they can middle click. (well, unless they're one of those one button mouse whackos, in which case hit shift while clicking)

    How about DIR and MENU? Redundant to UL... APPLET? redundant to OBJECT. The whole idea of removing those was to reduce the number of tags in the hope that with less tags developers could write cleaner code or at least start paying attention to the ones that remain... again something HTML5 seems to be in favor of completely undoing. (CANVAS, EMBED, VIDEO and AUDIO all being redundant to OBJECT, and of course they brought menu back for god only knows what on form elements instead of for use on *SHOCK* menus... NO, for that they have NAV)

    I really think you missed the point of STRICT, but then it often feels like the number of people who seem to have gotten it can be counted on one hand. Half of them have already posted in this thread... Now we just need Alex, Paul O'B and the Stupid Dutch Kitty to chime in and we'll have the superfecta. Though I think a lot of the misunderstanding can be blamed on the specification being written in such a convoluted legalese that a good lawyer could probably make it say anything he wanted to a jury. Hardly a wonder even the browser makers can't all agree on what the specifications actually SAY. (much less how to handle the stuff it doesn't even mention that it SHOULD)

    Ah, were that Dan was still with us... he was much more eloquent at explaining this stuff.

  10. #10
    Non-Member
    Join Date
    Jun 2010
    Location
    4727′35″N 2618′0″E
    Posts
    1,789
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by felgall View Post
    The transitional doctype is there simply to allow web pages originally written usiing HTML 3.2 to be transitioned to use HTML 4.

    If you use a transitional doctype it means your page still contains HTML 3.2 elements that were found to cause issued and which were therefore removed from HTML 4.

    The problem with having written pages that use HTML 3.2 is that it can take many years to find the time to clean up the HTML in order to remove that garbage and gain the full flexibility that HTML 4 offers. That's why most of the web is still stuck using HTML 3.2. In fact rather than fix their pages a lot of people have decided to just live with all those problems and have added some of the garbage back into the HTML 5 standard instead. That way they can be fully up to date with their stone age coding.
    a very good point. still, i would like to add one scenario to that. suppose we get css3 as a widely supported cross browser standard. for the rounded corners technique we'll then have two ways of doing things:
    -the old way
    Quote Originally Posted by AutisticCuckoo View Post
    Using empty elements to create 'hooks' for styling is less acceptable, but unfortunately necessary for some types of design.
    - and the new way
    Quote Originally Posted by AutisticCuckoo View Post
    ... with the arrival of CSS3's border-radius, multiple background images, etc.
    we'll have then two types of (html 4.01, i'm not talking about other possibilities) web pages, that have equal sign between them (they are both strict), but one of them is an example of bad practice. how will a wanting web programmer know to follow the good one (other that browsing sitepoint's forum ) ? why will the creators of the web pages employing the old way would even bother to embrace the new way (other than the fact that it will clear up their web page markup, but that means more work) ? because now, if he employs a similar bad habit, like using <font> instead of css style, he will not have it's code validated as strict.

    whereas, their page being marked as transitional would be a good reason to go ahead and ditch that old way when the time comes. maybe it's going to the extreme.

    Quote Originally Posted by deathshadow60 View Post
    Back to rounded corners, you need two elements to do a sliding doors before it; what are you going to use to do it? You can't do it without the extra elements -- so you use elements that apply no extra meaning to the page PRESERVING your semantic markup without implying any extra meaning.
    yes, but when you do that you should also plant an exclamation mark. let DTD transitional be the one, that's all i'am saying.

    Quote Originally Posted by deathshadow60 View Post
    If you're gonna rage every time you see a DIV or SPAN used as a presentational hook in a strict document, you not only missed the point of STRICT, you aren't going to get very far as a developer.
    i'm nothing but a zen person. i see i have to repeat my self:
    Quote Originally Posted by noonnope View Post
    basically, what i'm saying is this:
    -if one uses semantically neutral elements like div and span for the use of the actual content, that still qualifies as strict.
    - if one is going to abuse a strict only to achieve some presentational feats like rounded corners with images or others like that, feats that are making a heavy use of unnecessary (when it comes to actual content) elements, one should be honest about his intentions and change the DTD to transitional.
    i'm ok to using outerWrapper, header, footer divs. these are not the divs or spans that bother me when used as presentational hooks. these are normal uses for them. going overboard with that: empty, nested empty, empty neighboring divs and spans (or any other elements for that matter), just for the sake of a presentational feat that doesn't relate to the actual content not even a bit, those are my focus.

  11. #11
    Non-Member
    Join Date
    Jun 2010
    Location
    4727′35″N 2618′0″E
    Posts
    1,789
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    it's past edit time, so an addendum is in place. sorry for that.

    i think we didn't really needed html5 new feats that much. we needed css3 helping html 4.01 strict be a real strict.

    and at least as a sign of honesty to my self, as a web programmer, when bloating the markup (even if not affecting the semantics) for the sake of certain presentational feats, i should be honest and put a transitional until i find a better way. this will keep me going in the right direction and if used as a more general rule will help make a pretty clear distinction between a table layout that some will now mark as a strict DTD and a real strict one. validation alone using a validator will not necessarily and absolutely describe a strict.

  12. #12
    Non-Member bronze trophy
    Join Date
    Nov 2009
    Location
    Keene, NH
    Posts
    3,760
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by noonnope View Post
    i should be honest and put a transitional until i find a better way.
    Which is what I mean by missing the point of strict, which is not to say "don't use empty meaningless containers as hooks" -- because that's not what STRICT means.

    You're reading WAY too much into it. Though I agree it will be nice to be able to stop doing it in the six years to decade or so from now when CSS3 is real world deployable. (since to do so IMHO we need not only for it to reach recommendation, we should wait until IE8 is a long-gone memory)

  13. #13
    Non-Member
    Join Date
    Jun 2010
    Location
    4727′35″N 2618′0″E
    Posts
    1,789
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i agree then i miss the point of strict looking at it one way, and you miss the point of strict looking at it another way. i believe strict also speaks about the actual architecture of the markup you use, not semantics alone. you say that if semantics doesn't get hurt, markup can be a little bit more convoluted. ok.

    and i also believe that things in the browser war will expedite at one moment the updating and the disappearing act issues. that's why i don't believe it will take that much. and even so, years pass by with the speed of light. if it wasn't tied up that much with html5, css3 would've become useful to us much sooner.

    i don't support the stoppage in the use of rounded corner technique or some other techniques, if that's what you think. i just see fit a more proper underlining of the web pages using them, for a better distinction among true strict web pages and make believe strict web pages, using other judging factors aside validation as well. there are many web pages out there that take advantage of that validation icon. it only fair to find a way to amend them, taking account of the future of the web programming also.

  14. #14
    Non-Member
    Join Date
    Jun 2010
    Location
    4727′35″N 2618′0″E
    Posts
    1,789
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    to formulate in another way:

    html 4.01 strict( css 2.1)(w/ presentation techniques outside content point of view) doesn't equals
    html 4.01 strict(css 2.1)(w/o presentation techniques outside content point of view).

    and even more so

    html 4.01 strict( css 2.1)(w/ presentation techniques outside content point of view) doesn't equals
    html 4.01 strict(css 3)(w/o presentation techniques outside content point of view).

    the simple fact of css 3 draft appearing and making possible to do some things differently in html 4.01 strict, is changing the way we judge these otherwise semantically correct, but presentational oriented only, outside content point of view techniques, and the documents comprising them, and alters the meaning of strict. as it should. when css 3 becomes standard, i don't think html 4.01 will become deprecated. adjustments are in place for older standards. that's what i believe.

    i can see that there are drawbacks in that and possibly divergence, but these still exist today with the current way of judging and misuse of transitional and strict.

  15. #15
    Mouse catcher silver trophy Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,888
    Mentioned
    122 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by noonnope View Post
    to formulate in another way:

    html 4.01 strict( css 2.1)(w/ presentation techniques outside content point of view) doesn't equals
    html 4.01 strict(css 2.1)(w/o presentation techniques outside content point of view).
    Let me put it another way:

    HTML 4.01 Strict does not equals best practice.

    Yes, a page that employs best practice will validate against a Strict doctype, but that doesn't mean that a page that validates against a Strict doctype uses best practice, and that was never the intention.

    Validation against a doctype simply means that a site conforms to a particular structure and standards, as can be verified by an automatic checking procedure. Transitional simply means that it uses elements that have been deprecated. You might disagree with whether that is the way it should be, but it is the way it is.

    See http://validator.w3.org/docs/help.html#validandquality

    i can see that there are drawbacks in that and possibly divergence, but these still exist today with the current way of judging and misuse of transitional and strict.
    You might just have to accept that what you want the Strict doctype to be used for is never going to happen.

  16. #16
    Resident curmudgeon bronze trophy gary.turner's Avatar
    Join Date
    Jan 2009
    Location
    Dallas
    Posts
    990
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    As I read through this thread, I could only think that noonnope has a complete misunderstanding of what a DTD is, and the other commenters were drawn offside by his arguments; until Stevie D's comment addressed the underlying issue.

    The DTD is a statement of the language's grammar, or syntax. The DTD has no concern with the content or its meaning; only that the markup is used correctly by its rules. Semantic markup is about choosing the best element tags according to the what of the content's existence. The DTD doesn't care as long as the syntax is correct. As far as the DTD is concerned, a list (for example) could be marked up as a bunch of p, div, span, cite, or abbr elements, or not marked at all (as comma separated values, e.g.). Just be sure whatever markup you choose, no matter how nonsensical, follows the grammar, and it will be valid.

    Where noonnope got off track is in confusing the DTD and best practice. Where the others followed the derailment is in discussing best practice in terms of the DTD. Let us assume the markup is valid, and resume the discussion as one about practices, and leave the DTD out of it. Or, if the DTD is still in question, the answer is, use the DTD that defines the grammar you intend to follow. That's it.

    cheers,

    gary
    Anyone can build a usable website. It takes a graphic
    designer to make it slow, confusing, and painful to use.

    Simple minded html & css demos and tutorials

  17. #17
    SitePoint Evangelist Ed Seedhouse's Avatar
    Join Date
    Aug 2006
    Location
    Victoria, B.C. Canada
    Posts
    592
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    As Gary says above, merely making sure your page validates to a strict doctype does not, by itself, mean you have a well designed page. It is merely one step along the way to that goal.

    You can have a page that uses a strict doctype and validates 100&#37;, but is still utter crap. Well, you can build a lousy house on top of a good foundation too. That doesn't mean the good foundation is a bad idea, does it?
    Ed Seedhouse

  18. #18
    Non-Member
    Join Date
    Jun 2010
    Location
    4727′35″N 2618′0″E
    Posts
    1,789
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Stevie D and gary.turner are right. just not about my supposedly confusion looking at how oversimplified they describe things, it will be almost impossible to do that.

    they forget one thing: different DTDs means different best practices for each. where is that leaving us? DTD's also have attached to them some meaning, their validating rules have a meaning. otherwise they'll be just meaningless rules.

    i don't know where did the two of you get offtrack and say that i want to use strict for something. or change anything in any of them. i just want an adjustment in thinking. don't say strict and mean transitional. say transitional with hopes of getting better. in fact, i don't want to use strict DTD when i use deprecated (or soon to be deprecated) techniques. that's what transitional DTD is for. and we should adjust accordingly. at the time of their creation, nobody knew that techniques like rounded corners would appear and abuse the markup strict tried to clean up. if they known it i'm sure a recommandation against these techniques would have appeared written in those specs. just because a recommandation regarding a technique it's not there at the time of the writing, doesn't validates it's use along with a DTD or another.

    you are stripping the meaning out of DTDs and make out of them mindless validation rools. it's ok, if you don't care to think too much about what it means adopting one and you just need something to show off for: look, it's strict, i have the icon.

    choosing a DTD or another also fals into this category of best practice. unless you are shakespeare, than you can't use a grammar only for syntax purposes, leaving semantics behind. i'm sure you can't produce great work that will justify that.

    i'm not trying a spin. i made it very clear: the use of valid strict elements to achieve transitional techniques are turning an otherwise strict validated document in a wolf in sheeps clothes. and this wolf should be exposed as a "modern" transitional.

  19. #19
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,840
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    There are really two different groups that need standards - those creating the browsers and those creating the web pages. The standards we have are for those creating the browsers. The HTML 4 strict standard is what browsers need to support in HTML if the web pages are correctly coded by those writing the web pages. The standard that those writing the web pages should be following needs to include a LOT of additional things that the standards that we have do not specify since it was decided that the browser should be able to handle minor errors such as leaving out certain tags (labelled as optional in the standard but which will just generate problems if you actually do leave them out).

    The only reason that the transition doctype exists is that prior to about 2005 it wasn't possible to really try to follow the strict doctype as there were still popular browsers that didn't understand enough CSS. Unfortunately that means that those of us who wrote web pages before then still have a huge mess to finish cleaning up in our pages to get rid of all the HTML 3.2 presentational tags we had to use when we originally wrote the pages. Those months of effort would not have been necessary if browsers hadn't introduced those stupid tags in the first place. There is no reason apart from ignorance for anyone to select a transitional doctype and make a future maintenance nightmare for themselves now though although once CSS 3 is fully supported there will be further cleanup of the HTML 4 that will be possible as then the standards that the web pages should follow will have changed further. The standard that the browser writers will still need to follow will still be HTML 4 strict though so as to both allow time for the conversion plus because that standard doesn't deal with the sorts of changes that will be required to the HTML.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  20. #20
    Non-Member
    Join Date
    Jun 2010
    Location
    4727′35″N 2618′0″E
    Posts
    1,789
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    what maintenance nightmare? when you're gonna clean up your code, and if you take your self seriously you will eventually, that means also changing transitional to strict in your DTD, and only for those documents that employ techniques like those specified already. and this time you'll probably end up with a strict, no matter how you look at it.

    i don't like the idea of hidding behind a century old spec to justify the use in strict of some old techniques wearing emperor's new clothes. i have to decide in the present and for the future. <font> and divs or spans used for rounded corners or image replacement fall in the same category. elements that mix with the content to create useless presentation (as far as the content is concerned). that belongs to transitional. then and now. one circumvents the content free of presentation concept by pretending that the use of valid strict elements for presentational only purpose it's ok. it is, it's just not strict.

    div and span have a role to play in strict along with content. outside content concerns, these are equal to deprecated elements. it's a repetead mistake this use, and i believe it should be amended. by labeling it as a transitional way of doing things, until the moment a better way comes your path. maybe you're not able to switch to this other path yet, so, until that updating time comes, put some mark on those that need to be changed: transitional DTD. it's unorthodox? maybe, but it's less unorthodox then those convoluted contraptions named rounded corners techniques or image replacement techniques.

  21. #21
    Non-Member
    Join Date
    Jun 2010
    Location
    4727′35″N 2618′0″E
    Posts
    1,789
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by felgall View Post
    There is no reason apart from ignorance for anyone to select a transitional doctype and make a future maintenance nightmare for themselves [...]
    probably you misunderstand. when i say change strict to transitional, i only refer to those specific documents that are truly strict, but use those specific content indiferent techniques, like rounded corners or image replacement, we still need to use. i don't advocate in any way going back to using transitional along with all the deprecated elements.

    putting this exclamation mark on them, you'll have (or the person after you) a clear inventory of things to work on in near future, as well as a method to remind you (or the person after you) just that. you'll see a transitional DTD and wonder, and then remember (or the person after you): oh, i have in this document a deprecated presentational technique that it's not targeting any actual content at all. i remember now. ok, let's go to work. clean up the markup from this technique, use new ways to achieve the same result, change DTD to strict. job done.

    Quote Originally Posted by gary.turner View Post
    Where noonnope got off track is in confusing the DTD and best practice. Where the others followed the derailment is in discussing best practice in terms of the DTD. Let us assume the markup is valid, and resume the discussion as one about practices, and leave the DTD out of it. Or, if the DTD is still in question, the answer is, use the DTD that defines the grammar you intend to follow. That's it.

    cheers,

    gary
    well, what if i try and discuss a best practice involving the use of DTD? am i alowed to do that? you seem a bit rigid with the way i have to do things, with no real reason. last that i recall, all this things are part of a bigger interconected scheme and separating them creates the confusion you acuse me off (which i appreciate it as a way to discredit a person rather than an idea, a technique i would appreciate if you would not further use it on me in the future).

  22. #22
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,840
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by noonnope View Post
    probably you misunderstand. when i say change strict to transitional, i only refer to those specific documents that are truly strict, but use those specific content indiferent techniques, like rounded corners or image replacement, we still need to use.
    You can do all those things while still having the page validate as strict.

    The transitional doctype is specifically there to indicate that the page contains HTML 3.2 elements that have yet to be replaces and that does NOT apply in this situation.

    There are actually at least three different versions of HTML that an HTML 4 strict doctype applies to.

    1. The actual HTML 4 standards that the browsers need to impose in order to consider the web page to be HTML 4 - basically any page that validates as HTML 4 strict and also follows the few extra rules that the validator can't check for (such as form fields having a wrapper around them with the form wrapped around that).

    2. Pages that both follow the standards and areitten semantically with as few as possible extra div and span tags as are needed to work around the current limitations of CSS.

    3. Pages that are fully semantic without any extra hooks provided just to allow the presentation to work.

    None of these three are HTML 4 transitional, they are all HTML 4 strict and just vary in how they apply the HTML 4 strict rules. Perhaps what is needed is and additional marker at the top of the file to indicate which of these variants of HTML 4 strict that the page uses so that you know which pages that you need to cme back to and change once the CSS issues are resolved. This could be done by adding a comment after the doctype to indicate which level of HTML 4 strict is being applied.

    <!-- basic-->
    <!-- semantic plus hooks ->>
    <!-- fully semantic -->

    These would be the three levels to aim for when moving away from transitional and getting rid of the last of your HTML 3.2 tags (even if that is just to replace it temporarily with inline styles as a step along the way).

    The reason why there are no separate variants of the doctype for these three levels of compliance is that the standards are aimed at the browser writers as to what the browsers need to support and no generally accepted standards exist to fully define these levels for the web page authors. While individual sites may have these standards defined for their own internal use the specifics of their standards may differ slightly from those used by other sites.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  23. #23
    Non-Member
    Join Date
    Jun 2010
    Location
    4727′35″N 2618′0″E
    Posts
    1,789
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by felgall View Post
    You can do all those things while still having the page validate as strict.
    which i think is ... not good. that's all. i'm not trying to pass a law.

    Quote Originally Posted by felgall View Post
    The transitional doctype is specifically there to indicate that the page contains HTML 3.2 elements that have yet to be replaces and that does NOT apply in this situation.
    it does, with the exception of HTML 3.2. like this:

    The transitional doctype is specifically there to indicate that the page contains elements (or constructs) that have yet to be replaces.
    Quote Originally Posted by felgall View Post
    This could be done by adding a comment after the doctype to indicate which level of HTML 4 strict is being applied.

    <!-- basic-->
    <!-- semantic plus hooks ->>
    <!-- fully semantic -->
    mere use of commenting is not the best way to force techniques like rounded corners or image replacement, out of the markup some day. i think using transitional DTD as a more radical solution would prove more effective (and more dramatic, some may say).


    i'll take the rest under advisement, as a very good piece of knowledge you always provide.

  24. #24
    Non-Member bronze trophy
    Join Date
    Nov 2009
    Location
    Keene, NH
    Posts
    3,760
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by noonnope View Post
    they forget one thing: different DTDs means different best practices for each.
    WRONG -- why Wrong?

    Because there are no best practices for Tranny; because by definition transitional lets you use attributes like TARGET and tags like FONT and CENTER which are INHERENTLY bad practices.

    You're talking about DIV and SPAN as hooks as if they were bad practices; THEY AREN'T!!! You might be uncomfortable with them, but they are currently the best practice for accomplishing most of the effects people want on pages... especially since they have zero impact in changing the meaning of the tags they are around.

    It's what DIV and SPAN EXIST FOR! We need those hooks, and even CSS3 won't get rid of them completely (try doing transparent corners without a extra wrapper using :after -- you still need a relative PARENT; and double backgrounds won't do sliding doors with transparency either)

    Seriously, sliding doors transparent image corners -- try doing it even with CSS3. The 'rounded corners' code might not do the shape or pattern you want and is inconsistent cross browser, multiple backgrounds will overlap so you can't use those, :before or :after would take an extra wrapping parent element (like a div) to absolute position off of since they can't position off their immediate parent (why I think we need :beforeEnd and :afterBeginning or some such), so what's the "best practice" that won't effect the existing semantic markup?

    A DIV inside a DIV or a SPAN inside a H# tag, margin-right on the parent and absolute positioning on the inner element. Even CSS3 falls a bit short on pulling off what should be a simple effect.

    You might go screaming "AAAH, DIV's AAAAAAAH!!!" -- GET OVER IT! It's still not presentational markup since without CSS there's no presentation APPLIED. That's the difference between DIV/SPAN and CENTER/FONT/BASEFONT/BGCOLOR/COLOR etc, etc, etc...

    Advocating transitional just because you don't like sandbags and wrappers as styling hooks misses what STRICT is about; removing tags we don't need or shouldn't be using... and frankly, DIV and SPAN don't qualify under ANY of the categories of tags STRICT removed; APPLIED Presentation (CENTER, FONT, BGCOLOR), Redundancy (MENU, DIR), or just piss poor accessibility (iFRAME, TARGET)...

    You don't like DIV and SPAN; Whatever. Dumbest thing I've seen on a web development forums in a decade - and I've seen some STUPID MALFING CRAP out there. (Microformats, Jquery, WYSIWYGS...)

  25. #25
    Non-Member
    Join Date
    Jun 2010
    Location
    4727′35″N 2618′0″E
    Posts
    1,789
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you are keen on using an violent language, and spin the things i've said. i would appreciate if you would stop that.

    Quote Originally Posted by deathshadow60 View Post
    You don't like DIV and SPAN; Whatever. Dumbest thing I've seen on a web development forums in a decade - and I've seen some STUPID MALFING CRAP out there. (Microformats, Jquery, WYSIWYGS...)
    if your only point is that i don't like div and span, you are wrong. i love them. and support their use. i'm saying this again: i love div and span. can we please get over this? need i say it again? look below, it's too many times said already.

    the moment we start adding elements only as presentational hooks, like div, span, or any other element for that matter, but solely for the sake of presentation, just to be targeted later on with css (rounded corners techniques and others alike)
    using divs or spans to give structure to the document, that i believe it's ok. using divs and spans as hooks for simple presentational feats i believe it's ok still. things are changing the moment you begin adding divs and spans for rounded corners or image replacement techniques. it's too much, and your pretending to separate the content and presentation is already gone out the window.
    basically, what i'm saying is this:
    -if one uses semantically neutral elements like div and span for the use of the actual content, that still qualifies as strict.
    - if one is going to abuse a strict only to achieve some presentational feats like rounded corners with images or others like that, feats that are making a heavy use of unnecessary (when it comes to actual content) elements, one should be honest about his intentions and change the DTD to transitional.
    so if you are using elements for presentational feats only, that have nothing whatsoever to do with the structure or the presentation of the actual content (no matter what elements are those), your document may validate as strict (and that can happen also with a lot of openly declared transitional documents), but it really means transitional. it's (hopefully) still looking for a way to ditch those elements used only for presentation outside the content point of view.
    i'm ok to using outerWrapper, header, footer divs. these are not the divs or spans that bother me when used as presentational hooks. these are normal uses for them. going overboard with that: empty, nested empty, empty neighboring divs and spans (or any other elements for that matter), just for the sake of a presentational feat that doesn't relate to the actual content not even a bit, those are my focus.
    because i love them so much, as presentational hooks or as pure elements, it hurts me to see them abused and being said it's legal (strict). it's not (it's transitional). a better time will come for them, when they will not be slaves for techniques of pure useless presentation that have nothing to do with content. i fight for their rights.

    do you love your div and span? or are you just abusing them? then legalize it, put a transitional on it. you're about to set them free in the near future.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •