User-Friendly and SEO-Friendly Title Structure for WordPress

I personally find that this structure is the most user-friendly and SEO-friendly:

<title><?php wp_title( ' | ', true, 'right' ); ?></title>

which will result in:

Name of Post | Name of Site

For a live demo, reference this very blog.

UPDATE — While the above still works, you can now remove this from header.php and add the following to functions.php:

add_theme_support( 'title-tag' );

If you still wish to keep the | separator, you’ll now need to also add the following to functions.php:

add_filter( 'document_title_separator', 'generic_document_title_separator' );
function generic_document_title_separator( $sep ) {
$sep = "|";
return $sep;
}