Meta tags in the same line

蹲街弑〆低调 提交于 2019-12-24 06:38:56

问题


I'am using Zend Framework to create web sites. In my layout I write

<?php 
    echo $this->headTitle('Zend Framework');
    $this->headMeta()->appendName('keywords', 'framework php productivity'); 
    $this->headMeta()->appendName('description', 'some description');
    echo $this->headMeta();
?>

In source code meta-title and meta-keywords become in the same line.

<title>Zend Framework</title>          <meta name="keywords" content="framework php productivity" />
<meta name="description" content="some description" /> 

Is it realy matters on Search Optimisation or not?


回答1:


It does not. You can leave it alone.

But if you want to have a new line character, you can use:

$this->headMeta()->setPostfix("\n")



回答2:


No it won't matter the tags are on the same line, the search engines will recognize the <meta...../> tags, it doesn't care about new lines etc. as long as the tag opens (<meta) correctly and ends (/>) and what is in the middle is correctly formatted the search engines will be OK with it.
Meta tags are still read by search engines, but are not as important as they used to be.
The more you do to help the search engines the better, but more and more its about the content of the site itself.



来源:https://stackoverflow.com/questions/5165573/meta-tags-in-the-same-line

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!