add head() and a test for it
use null check for tag content instead of empty string
add title() and a test for it