Re: These tags are deprecated?

Discussion in 'HTML' started by Jukka K. Korpela, Oct 10, 2012.

  1. 2012-10-10 14:32, Tree hugger wrote:

    > So I was looking around and found this, "Named anchors have been
    > deprecated since HTML4 and replaced with element IDs," on this site:
    > http://w3fools.com/


    Umm... it's a bit confusing. The w3fools.com site is useful for
    demonstrating that w3schools.com is bogus, but it's not itself perfect
    either. This specific part refers to a w3schools.com page that does not
    (any more) mention the "name" attribute at all. The w3schools.com page
    refers to a more detailed page "HTML <a> Tag", and there the "name"
    attribute is mentioned, but now it has an opposite error: "Not supported
    in HTML5." That's nonsense; it is non-conforming in HTML5, but HTML5
    requires support to it (as it generally does for features that it
    declares as non-conforming).

    > I've also found this,


    It's from the previous millennium (24 December 1999).

    > "Use id or name? Authors should consider the
    > following issues when deciding whether to use id or name for an anchor
    > name:
    >
    > * The id attribute can act as more than just an anchor name (e.g.,
    > style sheet selector, processing identifier, etc.).
    > * Some older user agents don't support anchors created with the id
    > attribute.


    This cannot an issue now, 12 years later. Even IE 4 supports the "id"
    attribute, and you can hardly find browsers older than that in the wild
    (or if you do, their users must be exercising some odd form masochism,
    and you should do them a favor and hit them with a strong "id").

    I just tracked down some historical documents that say that in Netscape
    (which was once the bottleneck in browser support), support to "id" was
    added in version 3.0, as far as linking is considered. Netscape 3.0 was
    released August 19, 1996.

    > * The name attribute allows richer anchor names (with entities)."


    That's obscure, and especially after some developments, it's misleading.
    First, using entities does not make anyone richer. Second, by HTML 4.01,
    which this is about, "name" attribute values have a much more permissive
    character repertoire than "id" attribute values, but browsers have been
    very permissive about "id" too, and this is about to come official (some
    day) as per HTML5.

    > I've been using the <a name=....> tag as an anchor target for years.
    > Is there a consensus that it's time, or way past time, to stop doing
    > that and use only <[whatever] id=....> tags for that purpose?


    Yes.

    (Please do not shoot me for using <a name=....> on some pages. They are
    needed for certain software that I use for generating a page tree from a
    single-page version. I have lost contact with the author of the software
    [that's me many years ago].)

    > In the same vein, I've mostly been using the <em> and <strong> tags
    > instead of the easier to rapidly type <i> and <b> tags. I see that the
    > <i> and <b> tags are deprecated,


    In HTML 4.01, that is. In HTML5, they have been munged to have a
    completely new "semantics", which is understood by about 1 person in the
    known universe. But both of these things are just "theory" (and I don't
    mean "theory" in the positive sense).

    > but it looks like no one expects them
    > to ever go away or not be supported owing to their ubiquity.


    By HTML5 drafts, browsers are required to support them, with no
    requirement that any of the fancy new HTML5 "semantics" should matter
    the least in the support.

    > Do folks
    > here agree with the assessment that those two tags will remain
    > supported for the foreseeable future?


    I suppose folks here have different ideas about this.

    The only real reason to move from <i> and <b> to <em> and <strong> that
    I can see is that it makes your code look better in the eyes of fellow
    developers or immediate boss (if he thinks he understands HTML).
    Superstitions and slogans become a reality when they become popular
    enough among people that you need to care about.

    However, even the HTML Anarchist's leaflet
    http://www.cs.tut.fi/~jkorpela/pragmatic-html.html8
    reminds you of the "distinction principle". When you decide to use
    italic, for example, select different markup according to the basic
    reason for using italic in each case. Just as in disciplined use of a
    word processor, you don't just italicize text; instead, you use a named
    style, possibly after defining a new one.

    You could use <i> with different class attributes, or you could use <i>
    ~ <em> ~ <var> ~ <dfn> if you like, but there is a chance that some
    fancy browser gets interesting ideas about rendering, say, <em>, <var>,
    <dfn> in different colors by default. This is much less likely with <i>,
    which simply means "italic" in reality. (Oh well, the concept of
    "italic" is really complicated - it can get rendered as real italic, or
    oblique, or fake italic. But just the same applies to CSS font-style:
    italic.)

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
     
    Jukka K. Korpela, Oct 10, 2012
    #1
    1. Advertising

  2. Jukka K. Korpela

    Tim Streater Guest

    In article <k53qg5$g1r$>,
    "Jukka K. Korpela" <> wrote:

    > 2012-10-10 14:32, Tree hugger wrote:


    > > In the same vein, I've mostly been using the <em> and <strong> tags
    > > instead of the easier to rapidly type <i> and <b> tags. I see that the
    > > <i> and <b> tags are deprecated,

    >
    > In HTML 4.01, that is. In HTML5, they have been munged to have a
    > completely new "semantics", which is understood by about 1 person in the
    > known universe. But both of these things are just "theory" (and I don't
    > mean "theory" in the positive sense).
    >
    > > but it looks like no one expects them
    > > to ever go away or not be supported owing to their ubiquity.

    >
    > By HTML5 drafts, browsers are required to support them, with no
    > requirement that any of the fancy new HTML5 "semantics" should matter
    > the least in the support.


    <font> is another of these supposedly deprecated tags. And yet, what
    gets generated if you make yourself a little rich-text editor in HTML5
    using the contenteditable attribute and execCommand? Yes, <b>, <i>, and
    <font>.

    > The only real reason to move from <i> and <b> to <em> and <strong> that
    > I can see is that it makes your code look better in the eyes of fellow
    > developers or immediate boss (if he thinks he understands HTML).


    Especially on various newsgroups frequented by certain people.

    --
    Tim

    "That excessive bail ought not to be required, nor excessive fines imposed,
    nor cruel and unusual punishments inflicted" -- Bill of Rights 1689
     
    Tim Streater, Oct 10, 2012
    #2
    1. Advertising

  3. 2012-10-10 17:55, Tim Streater wrote:

    >> By HTML5 drafts, browsers are required to support [<b> and <i>], with no
    >> requirement that any of the fancy new HTML5 "semantics" should matter
    >> the least in the support.

    >
    > <font> is another of these supposedly deprecated tags.


    Technically, it is deprecated in HTML 4.01, obsolete in HTML5 drafts
    (but continued browser support is still required).

    > And yet, what
    > gets generated if you make yourself a little rich-text editor in HTML5
    > using the contenteditable attribute and execCommand? Yes, <b>, <i>, and
    > <font>.


    This is a good example of a situation where such markup (or such
    elements - the editor could operate on a document tree only) is the most
    adequate. When a user bolds a word, then all we know is that he wants it
    to be bold, and the <p> element properly reflects this. Another example,
    my favorite, is an HTML-ized version of printed text that contains bold
    text and the reason for bolding is unknown or disputable. A third
    example is a vector symbol in mathematics: such symbols are, by
    conventions and standard, written in bold italic, so <b><i>a</i></b> is
    adequate, better than <span class=vector>a</span>.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
     
    Jukka K. Korpela, Oct 10, 2012
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dean H. Saxe
    Replies:
    0
    Views:
    1,036
    Dean H. Saxe
    Jan 3, 2004
  2. Rob Nicholson
    Replies:
    3
    Views:
    746
    Rob Nicholson
    May 28, 2005
  3. Barney Barumba
    Replies:
    0
    Views:
    564
    Barney Barumba
    Jul 23, 2003
  4. Ranganath

    Custom Tags within Custom Tags.

    Ranganath, Oct 17, 2003, in forum: Java
    Replies:
    2
    Views:
    460
    Ranganath
    Oct 21, 2003
  5. Fabian
    Replies:
    10
    Views:
    1,094
    Leif K-Brooks
    Oct 7, 2003
Loading...

Share This Page