This forum is now read-only. Please use our new forums! Go to forums

banner
Close banner
0 points
Submitted by Sapphirescript
over 9 years

<title> is disappearing upon input.

When inside the head paragraph, the text will always show up unless I use the indicated “title-/title” tag, then it will disappear. I can use h1 or anything else and it will work. (I have had the system copy and paste, changed the zooming of my browser and reset the page.)

Answer 54977710937676ebbf005e1f

1 vote

Permalink

Some tag definitions:

<!DOCTYPE html> // Document Type Declaration

The DOCTYPE tells the browser to expect HTML as TEXT.

<html></html> // HTML Element

The above is also referred to as document root since it is the root element, and has no parent. There are two defined child elements, in order,

<head></head> // document header
<body></body> // document body

The document header contains DOM interface related elements, none of which are rendered to the display, with exception to <title></title> which is handled by the browser and output in the Title Bar or Tab, as applies. Typical <head></head> child elements:

<title></title> // Document Title

The document title is to many the most important element in the page. <title></title> is not valid HTML in the document body and should appear near the top of document.

<head>
    <meta charset="UTF-8">
    <title>Best position for Title is here.</title>
    <!-- other elements -->
</head>

The <meta> element is also not valid HTML in the document body. Metadata, as the tag implies is information that is supplied to the browser (user agent) outside of the user interface. there is a wide range of potential metadata which I won’t get into, here. Above we declare the character set encoding to which the document conforms.

<link>
<script></script>
<style></style>

The above three round out the elements we will normally use in our documents. Of these, only <script></script> is valid in the document body.

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Best position for Title is here.</title>
        <link rel="stylesheet" href="styles.css">
        <style>/* CSS rules */</style>
        <script src="script.js"></script>
        <script>// JavaScript code</script>
    </head>
    <body>
        <h1>Top level heading</h1>
        <div>
            <h2>Section heading</h2>
            <p>Lorem ipsum &hellip;</p>
        </div>
    </body>
</html>
points
Submitted by Roy
over 9 years

Answer 54e3db2151b887bba2001385

1 vote

Permalink

IT TELLS ME TITLE IS NOT COMPLETE BUT I HAVE

points
Submitted by Karen Balkin
about 9 years

5 comments

Karen Balkin about 9 years

ON 4/6 OF CREATING A WEBSITE

Roy about 9 years

We need to see your index.html code. Please, Ask a Question in a new thread, and include the HTML so we can examine and discuss it with you. Be sure when you paste in the HTML you give a blank line above it, and after pasting, select all the code and click the {} (block format) button in the toolbar. This way we will be able to see the HTML. Please do not post it in this thread. Thank you.

Mrs.Meringolo over 8 years

I am having the exact same problem!

stetim94 over 8 years

good for you, what else do you want me to say? We want to help you, but we can’t do that with: i have the same problem, please provide us with your code

Roy over 8 years

IN A NEW QUESTION, not in this thread, please.

Answer 549988ed95e378aca00094d9

0 votes

Permalink

@roy, great explanation (as always) but i qoute from your answer: with exception to which is handled by the browser and output in the Title Bar or Tab, as applies

problem: codecademy overwrites the title (or doesn’t allow users title in tab?)

so, if you want to see the title you can create a html file with notepad(++) or any other text editor and open the file in the browser, you will see the title

points
Submitted by stetim94
over 9 years

Answer 54ed1dc051b887b20b00040a

0 votes

Permalink

ok thank you!

points
Submitted by Karen Balkin
about 9 years

Answer 56032fa7e39efee5c600032c

0 votes

Permalink

I copied the exact text from the instructions, and titles never show up on any of the HTML lessons. The website allows me to go on to the next lesson, but titles won’t show up at all with the correct code and everything.

points
Submitted by Tenn1518
over 8 years

1 comments

stetim94 over 8 years

title is suppose to show up in the the browser tab, but due to codecademy’s use of iframe, it wont. Make a html file with a text-editor or try on www.jsbin.com