right doctype for RDFa breadcrumbs navigation and validator

前端 未结 3 1118
萌比男神i
萌比男神i 2021-01-23 19:50

I need to make my mind clear about HTML doctypes. in this page: http://kovo.intl.uk.to I add breadcrumbs navigation using RDFa. but then page was no more valid. I googled and I

相关标签:
3条回答
  • 2021-01-23 20:40

    From Wikipedia:

    XHTML 1.0 is "a reformulation of the three HTML 4 document types as applications of XML 1.0"

    So you are fine, it's still an equivalent of HTML 4:

     There are three formal DTDs for XHTML 1.0, corresponding to the three different versions of HTML 4.01:
    
    - XHTML 1.0 Strict is the XML equivalent to strict HTML 4.01, and includes elements and attributes that have not been marked deprecated in the HTML 4.01 specification. As of May 25, 2011, XHTML 1.0 Strict is the document type used for the homepage of the website of the World Wide Web Consortium.
    - XHTML 1.0 Transitional is the XML equivalent of HTML 4.01 Transitional, and includes the presentational elements (such as center, font and strike) excluded from the strict version.
    - XHTML 1.0 Frameset is the XML equivalent of HTML 4.01 Frameset, and allows for the definition of frameset documents—a common Web feature in the late 1990s.
    

    XHTML+RDFa from Wikipedia:

    XHTML+RDFa is one of the techniques used to develop Semantic Web content by embedding rich semantic markup. Version 1.1 of the language is a superset of XHTML 1.1

    0 讨论(0)
  • 2021-01-23 20:42

    RDFa 1.0 can be used in XHTML 1.0 (using the DOCTYPE included in your question).

    RDFa 1.1 can be used in probably any (X)HTML version (all interpreted through the HTML5 parsing rules), i.e.: HTML5, XHTML5, HTML 4.01, XHTML 1.0, XHTML 1.1, …:

    • HTML+RDFa 1.1 (W3C Recommendation 22 August 2013)

      Support for RDFa in HTML4 and HTML5

    • XHTML+RDFa 1.1 - Second Edition (W3C Recommendation 22 August 2013)

      Support for RDFa via XHTML Modularization

    0 讨论(0)
  • 2021-01-23 20:53

    Try to use this

    <!DOCTYPE html>
    <html vocab="http://www.w3.org/2011/rdfa-context/rdfa-1.1">
    
                <head>  <title>Kovove webstránky</title>
                    <!-- Just for validation purpose the if clause -->
                    <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge" /><![endif]-->
                    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
                    <link rel="stylesheet" href="../css/main.css" />
                    <script type="text/javascript" src="../js/jquery-1.8.3.min.js"></script>
                    <script type="text/javascript" src="../js/anim.js"></script>
                </head>
    
                <body>
                <div class="pagewrap">
                        <div class="menu vrch"> 
                                    <div class="aktivna">
                                <a class="pol" href="http://kovo.intl.uk.to/index.php"><span>Domov</span></a>
                                <a class="arrowh" href="http://kovo.intl.uk.to/index.php">
                                    <span></span>
                                    <span></span>
                                </a>
                            </div>
                                    <div class="">
                                <a class="pol" href="http://kovo.intl.uk.to/tvorba"><span>Tvorba</span></a>
                                <a class="arrowh" href="http://kovo.intl.uk.to/tvorba">
                                    <span></span>
                                    <span></span>
                                </a>
                            </div>
                                    <div class="">
                                <a class="pol" href="http://kovo.intl.uk.to/blog"><span>Blog</span></a>
                                <a class="arrowh" href="http://kovo.intl.uk.to/blog">
                                    <span></span>
                                    <span></span>
                                </a>
                            </div>
                                    <div class="">
                                <a class="pol" href="http://kovo.intl.uk.to/ine"><span>Daco iné</span></a>
                                <a class="arrowh" href="http://kovo.intl.uk.to/ine">
                                    <span></span>
                                    <span></span>
                                </a>
                            </div>
                            </div>
                    <div class="menu nalavo">
                        <div class="aktivna">
                            <a class="ico" rel="nofollow" href="">
    
                            </a>
                            <a class="arrow" rel="nofollow" href="">
                                <span></span>
                                <span></span>
                            </a> 
                        </div>
    
                    </div>
                    <div class="stred">
                        <div class="telo">
                            <div class="bread">
                                    <div>
                        <span typeof="v:Breadcrumb">
                                            <a href="http://kovo.intl.uk.to" rel="v:url" property="v:title">kovo.intl.uk.to</a>&nbsp;&gt;&nbsp;
                                    </span>
                    </div>
                    <div>
                        <span typeof="v:Breadcrumb">
                            Domovská stránka        </span>
                    </div>
                            </div>
    
                            <h1>Nadpis 1 </h1>
                            blablablabla 
                            blablabl
                            blablablabla
                            blablablabla
                            blablablabla
                            blablablablablablablablablablablablablablablablablablablablablablablablablablab
                            lablablablablablablablablsdasdasdasdasdasdasdsdfsdgdfgdfgdfgdfgdfgdfgdfgdfgdfgdfgdfgfdg
                            ablablablablablablablablablablablablablablablablablablablablablablablablablabl
                            ablablablablablablablablablablablablablablablablablablabla
                        </div>
                    </div>
                        <div class="peta">
                        <span class="left">&copy; 2014 Matej Kovác</span>
                        <span class="right"><a href="http://validator.w3.org/check?uri=referer">(X)HTML valid</a></span>
                    </div>
                </div>
                </body>
    
                </html>
    

    On the other hand you should read more about the semantic web.

    This validates ok!

    0 讨论(0)
提交回复
热议问题