[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


From: Ivan Shmakov
Subject: [OT] HTML5
Date: Tue, 23 Dec 2014 10:55:27 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

>>>>> Lennart Borgman <address@hidden> writes:
>>>>> On Dec 23, 2014 10:28 AM, "Steinar Bang" <address@hidden> wrote:
>>>>> Yuri Khan <address@hidden>:

 >>> I’m a firm believer in closing tags explicitly and properly.
 >>> Especially when the markup is not hand-written but generated.
 >>> There’s just no excuse for generating invalid or sloppy markup.

 >> +1

 > In html5 there is also single tags (whatever they call them, I don't
 > remember right now).

        In HTML5, they’re called /void elements./ [1]

    […] Void elements only have a start tag; end tags must not be
    specified for void elements. […]

 > The preferred way is to write <hr> instead of <hr />.

        The HTML5 TR is mainly concerned with document /models/ (rather
        than document /markup/), and explicitly allows for /two/
        different representations (that is: different markup languages,
        essentially) of such models, – HTML and XHTML [2]:

    There are various concrete syntaxes that can be used to transmit
    resources that use this abstract language, two of which are defined
    in this specification.

        In HTML, /both/ of the above are the valid representations of a
        void element.  In XHTML, the valid representations for a void
        ‘hr’ element would be <hr /> and <hr></hr>.

        The <hr /> form comes useful if, for some reason, you have to
        make a single file processable by both HTML and XML readers.
        (For the same reason, HTML5 explicitly allows the use of the
        otherwise meaningless xml:lang and xmlns attributes with the
        HTML syntax.)  There’s no other use or preference regarding
        these representations.

 > Btw, this is something html5 indentation code must take care of.  It
 > must have a list of those tags to be able to do that, of course.


[1] http://www.w3.org/TR/html5/syntax.html#elements-0
[2] http://www.w3.org/TR/html5/introduction.html#html-vs-xhtml

FSF associate member #7257  http://boycottsystemd.org/  … 3013 B6A0 230E 334A

reply via email to

[Prev in Thread] Current Thread [Next in Thread]