XHTML 和搜索引擎优化 [英] XHTML and Search Engine Optimization

查看:29
本文介绍了XHTML 和搜索引擎优化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是编码世界和 XHTML 的新手.我正在将示例页面放在一起,但是阅读了许多相互矛盾的文章,有人建议导航 div 块出现在内容 div 块上方,反之亦然,或者根本不重要?以下是我的基本代码作为示例.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><头><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><meta http-equiv="Content-Language" content="en-us"/><meta http-equiv="imagetoolbar" content="no"/><meta name="MSSmartTagsPreventParsing" content="true"/><meta name="keywords" content=""/><meta name="description" content=""/><meta name="author" content=""/><title>示例页面</title><link rel="stylsheet" type="text/css" href="web.css" media="all"/><style type="text/css" media="all">身体 {边距:0;填充:0;字体系列:arial、verdana、sans-serif;字体大小:中等;字体粗细:正常;字体样式:无;文字装饰:无;}#包装{边框:1px 实心 #eeeeee;宽度:960px;边距:0px 自动;}#header {背景颜色:橙色;}#leftnav {背景颜色:黄色;向左飘浮;}#rightnav {背景颜色:蓝色;浮动:对;}#内容 {背景颜色:灰色;}#页脚{清楚:两者;背景颜色:绿色;}</风格><身体><div id="包装器"><div id="标题">标题

<div id="leftnav">左侧导航

<div id="rightnav">右导航

<div id="内容">内容

<div id="页脚">页脚

</html>

解决方案

理想情况下,从 SEO 的角度来看,您希望最重要的代码出现在 HTML 源代码中的最高位置.这是可能影响页面中某些内容对搜索引擎的重要性的众多因素之一.

如果是我,我会对提供的基本模板进行以下调整

I am new to the world of coding as well as XHTML. I am in the process of putting a sample page together however having read a number of conflicting articles, it has been suggested that the navigation div block appear above the content div block or vice versa or does it not matter at all? Below is my base code as an example.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta http-equiv="Content-Language" content="en-us" />
    <meta http-equiv="imagetoolbar" content="no" />

    <meta name="MSSmartTagsPreventParsing" content="true" />
    <meta name="keywords" content="" />
    <meta name="description" content="" />
    <meta name="author" content="" />
    <title>Sample page</title>

    <link rel="stylsheet" type="text/css" href="web.css" media="all" />

    <style type="text/css" media="all">

    body {

        margin: 0;
        padding: 0;
        font-family: arial, verdana, sans-serif;
        font-size: medium;
        font-weight: normal;
        font-style: none;
        text-decoration: none;

    }

    #wrapper {

        border: 1px solid #eeeeee;
        width: 960px;
        margin: 0px auto;

    }

    #header {

        background-color: orange;

    }

    #leftnav {

        background-color: yellow;
        float: left;

    }

    #rightnav {

        background-color: blue;
        float: right;

    }


    #content {

        background-color: gray;

    }


    #footer {
        clear: both;
        background-color: green;

    }

    </style>

</head>

<body>

    <div id="wrapper">
        <div id="header">
            header
        </div>

        <div id="leftnav">
            leftnav
        </div>

        <div id="rightnav">
            rightnav
        </div>

        <div id="content">
            content
        </div>

        <div id="footer">
            footer
        </div>
    </div>

</body>
</html>

解决方案

Ideally from an SEO perspective you would want the most important code to appear highest in the HTML source. This is one of the many factors that potentially contribute to how important certain content within a page is perceived to be to search engines.

If it were me I would make the following adjustments to the base template provided

这篇关于XHTML 和搜索引擎优化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
其他开发最新文章
热门教程
热门工具
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆