I am learning how to develop a Drupal template, have been exploring the files of the default template and have found that the doc type declaration is only found in the maintenance page so I was wondering how is the doc type added to the page when not in maintenance mode
It depends on the version of Drupal you are using. On Drupal 6, you include all of the html document information in your page.tpl.php file. In Drupal 7 all of the document information is inherited from html.tpl.php in the core Drupal framework unless you create your own html.tpl.php.
This method of inheritance is handy because for very basic sites your theme can consist of about 4 files and as the site gets more complex, you add what you need to override the various templates.
I often override html.tpl.php so that I can throw in a meta tag for IE browsers to force them to display using the most recent document mode (<meta http-equiv="X-UA-Compatible" content="IE=edge" />). You can override the base template by copying the original and moving it into your theme directory.
You can find the boilerplate html.tpl.php file in the root directory of your Drupal site at: /modules/system
Thank you for the info, I will look into the html.tpl.php in the modules/system as I am using version 7
Sounds good... I figured you were probably using Drupal 7.
Have a good weekend!