问题
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