Search code examples
htmlseometa

Difference between <meta name="title"> tag and <title></title> tag


Please clarify what is the difference between <meta name="title"> tag and <title></title> tag.

<title>Page title</title>
<meta name="title" content="Page title">

If both are used, which is most prioritised?

I observed some sites that have both <meta name="title"> and <title></title> tags and both are the same, which is expected, please confirm?

If we didn't use <meta name="title"> tag title, would I have any problem regarding SEO?

<head>
<title>Stackoverflow</title>
<meta name="description" content="free source">
<meta name="keywords" content="HTML,CSS,XML,JavaScript">    
</head>

Solution

  • <title> is a required element on any HTML page to be valid markup, and will be what is displayed as the page title in your browser's tab/window title. For instance, try inputting the following markup into the W3C Markup Validator (via "Direct Input"):

    <!DOCTYPE html>
    <html>
        <head></head>
        <body></body>
    </html>
    

    This will produce an error that there is no instance of <title> in <head>.

    The <meta name="title" content="page-title"> element is just that -- metadata about your page, that any client browser or web crawler can use or not use as it wants. Whether it is used or not will depend on the crawler/client in question, as none of them are required to look for or not look for it.

    So in short, you should have a <title> element if you want valid markup. The <meta> tag is going to depend on whether you want to provide for crawlers/clients, and you'd probably have to check documentation for if a particular crawler uses it.