Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What meta tags to include on a modern website?

Tags:

html

meta-tags

Currently all I have on each page is <meta http-equiv="content-type" content="text/html; charset=UTF-8" />. Do people still include meta tags like keywords, description, and author? If so, should they go on every HTML page or just the home-page?

like image 447
John Smith Avatar asked Mar 13 '11 15:03

John Smith


1 Answers

Well you defiantly should have the meta charset

<meta charset="utf-8">

The http-equiv is not needed because it represents the HTTP header equivalent. For the web however the Content-Type HTTP header supplied via the web server (probably apache) should do. You can override the server defaults via .htaccess or using the PHP header() function.

It is also not a bad idea to include

<meta name="description" content="">
<meta name="author" content="">

Paul Irish's html5 boiler plate also recommends using:

<!-- Always force latest IE rendering engine (even in intranet) this if you use the .htaccess -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">

http://html5boilerplate.com/docs/#The-markup★make-sure-the-latest-version-of-ie-is-used

<!-- Mobile viewport optimized: j.mp/bplateviewport -->
<meta name="viewport" content="width=device-width, initial-scale=1.0">

http://html5boilerplate.com/docs/#The-markup★mobile-viewport--creating-a-mobile-version

like image 179
Tom Avatar answered Sep 22 '22 06:09

Tom