htmltitle

Why is the text in my title tag showing up as plain text on the page?


This was asked before, but it wasn't clear what the solution was, so I'm asking now. I have written an HTML5 page that is not only showing the element in the bar (as, of course, it should) but also in the first line of the web page. WTH? I have never encountered this problem before and it's completely baffling. What have I done wrong? Any help would be appreciated. My code is below and I've stripped it down to the bare minimum so as to pinpoint the issue.

Here's my HTML:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8" />
    <title>MBSeacott.com</title>

    <link rel="stylesheet" href="css/fullscreenimg.css" type="text/css" />
    <link rel="stylesheet" href="css/mainstyle.css" type="text/css" />
</head>
<body></body>
</html>

Thanks in advance, MB


Solution

  • Maybe you have set display:block for the title element? E.g., with * {display:block;} (resp. something other than none).

    If so, then you could overwrite it, e.g., with title {display:none;}. Or, to make sure that no other childs of the head element may appear in the future: head {display:none;}.