I have set doctype to HTML 5 like this:
$view->doctype('HTML5');
Then I have added a stylesheet like this:
$view->headLink()->appendStylesheet($view->baseUrl().'/css/reset.css');
It produces link tag like this:
<link href="/css/reset.css" media="screen" rel="stylesheet" type="text/css" >
But for HTML 5 this would be correct, no?
<link rel="stylesheet" href="/css/reset.css">
One more question. How to produce meta tag like this with headMeta() helper?
<meta chars开发者_开发知识库et="utf-8">
To produce the tag
<meta charset="utf-8">
you can do the following.
$view->headMeta()->setCharset( 'UTF-8' );
The link tag produced by Zend is correct as well. The difference is that Zend tries to be more specific.
Go here to see the different options for the media tag.
Yours is correct too but the tag Zend displays gives the browser a better idea of how to display you page by telling it what type of display the html document is meant for.
精彩评论