2

我需要弄清楚 HTML 文档类型。在此页面中:http: //kovo.intl.uk.to我使用 RDFa 添加面包屑导航。但随后页面不再有效。我用谷歌搜索,发现将 doctype 更改为:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">

现在页面是 100% 有效的,但是 XHTML 和这样的 LOW 数字是什么意思?在我的网页上,我严格使用 HTML 4.01,因为我主要用斯洛伐克语为斯洛伐克人编写页面,我在某些计算机上看到的以及它们的使用方式是“石器时代”(Windows XP + ie8 更好:D)。

这是正确的解决方案吗?对用户或搜索引擎有什么影响?

4

3 回答 3

3

RDFa 1.0可用于 XHTML 1.0(使用问题中包含的 DOCTYPE)。

RDFa 1.1可以在任何 (X)HTML 版本中使用(全部通过 HTML5 解析规则进行解释),即:HTML5、XHTML5、HTML 4.01、XHTML 1.0、XHTML 1.1 ……:

于 2014-02-04T17:32:54.813 回答
1

尝试使用这个

<!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>

另一方面,您应该阅读更多有关语义网的信息。

这验证正常!

于 2014-03-17T12:57:00.750 回答
1

来自维基百科:

XHTML 1.0 是“作为 XML 1.0 应用程序的三种 HTML 4 文档类型的重新表述”

所以你很好,它仍然相当于 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:

XHTML+RDFa 是通过嵌入丰富的语义标记来开发语义 Web 内容的技术之一。该语言的 1.1 版是 XHTML 1.1 的超集

于 2014-02-04T16:04:29.627 回答