2 questions about HTML5 markup

  1. Is it enough to have only the new HTML5 <meta charset="UTF-8"> or should I also add the old one (in case older browsers don’t understand it or something? <meta http-equiv="content-type" content="text/html;charset=UTF-8">

  2. Where is it best to put the new <nav> tag for the main menu of the site? inside the header tag or right after it?

Thanks.

  1. TL;DR you can use HTML5 - https://code.google.com/p/doctype-mirror/wiki/MetaCharsetAttribute
  2. Doesn’t matter.
  1. TL;DR you can use HTML5 - https://code.google.com/p/doctype-mirror/wiki/MetaCharsetAttribute

Thanks, so according to this using only <meta charset="UTF-8"> should be enough.

About the 2nd question, I know it doesn’t matter where to put the elements, but I want to know for example how to make them look importnat by web crawlers, for example if putting the nav inside the header tag will make it look more important.

AFAIK it doesn’t matter. I couldn’t find anything on google to say that it DOES make a difference. It’s hard ot prove what matters/does not matter when it comes to SEO.

Ok, thanks for the answers :smile:

This is a standard opening to an HTML file these days that works everywhere:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
1 Like