How to Declare DocType via HTML

Your website is like an online business card: the way it is organized on the outside, as well as on in the inside says a lot about you and your personal or corporate brand. And in order to make your website fully functional, you have to work on in from the inside out. We’ve discussed here other topics, such as Google indexation, 404 error pages, sitemaps, Google webmaster tools and robots.txt. Today we discuss about how you can declare doctype using HTML.

What s Doctype Declaration?

Doctype declaration is a code that sends instructions and information to the web browser about the version of HTML the page is written in. This is not a HTML tag, one of the reasons why it must be declared before the html tag.

How Do I Declare Doctype in HTML?

First off, you have to insert the “!DOCTYPE” function before the tag. See example below:

 

What Type of HTML Works with Doctype?

DOCTYPE Declarations vary on type of HTML you are using in your page. In some HTML types, a DTD must be specified so that the browsers render the content correctly. See examples below:

Example - HTML Tags

Now you are just steps away from having a website that performs great on the web! Check back for more tutorials.

Sergiu Draganus
CEO - GeoRanker

Sergiu Draganus is an Entrepreneur, CEO & Co-Funder of GeoRanker and Conference Speaker - open to approach any new type of analysis and suggestions related to Local SEO.

READY TO GET STARTED?

Copyright 2024 © GeoRanker. All rights reserved.