Normally, header.php will start with html doctype declaration, and xhtml namespace. By default, WordPress theme is using XHTML 1.0 Transitional. WordPress function, language_attributes();, will display the language attributes for the html tag. If you want your site supporting XFN (XHTML Friends Network), you can add profile="https://gmpg.org/xfn/11" for the header tag.
Here come to body tag, you might want to display title and desciption on every page in your web site. The header.php is the right place to put all this information. Following is the example header.php code that you can reference.
If you see the example above, there is a condition in meta tag for description. It is showing different description on single post compare to the rest. In single post, it will describe the post title instead of the site description.
By default, WordPress has build-in feeds for blog web site. I choose RSS 2.0 feed. There are others you can choose from, but this is the common one.
- WordPress Theme Development 1 - Start with Theme Style Sheet
- WordPress Theme Development 2 - Minimum Main Index Template