This forum is now read-only. Please use our new forums at discuss.codecademy.com.

HTML Basics Forum

View Course

161 points
6ebe989aae59c86f4e79e230988d8f9a?s=140&d=retro
Submitted by
Sapphirescript
almost 3 years ago

<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.)


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>

8298 points
5958b8ebe12813a2a3000034_980106998
Submitted by
Roy
almost 3 years ago


1 vote

permalink

IT TELLS ME TITLE IS NOT COMPLETE BUT I HAVE KAREN'S PHOTOGRAPHY

43 points
3d456c4eba1e1c93dbec41434e9b6150?s=140&d=retro
Submitted by
Karen Balkin
almost 3 years ago

5 Comments

3d456c4eba1e1c93dbec41434e9b6150?s=140&d=retro Karen Balkin almost 3 years ago

ON 4/6 OF CREATING A WEBSITE

5958b8ebe12813a2a3000034_980106998 Roy almost 3 years ago

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.

B04c4fdd7b5268d4360d5d331b3a0116?s=140&d=retro Mrs.Meringolo about 2 years ago

I am having the exact same problem!

593d545c83696644420003b7_64554016 stetim94 about 2 years ago

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

5958b8ebe12813a2a3000034_980106998 Roy about 2 years ago

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


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

2937 points
593d545c83696644420003b7_64554016
Submitted by
stetim94
almost 3 years ago


0 votes

permalink

ok thank you!

43 points
3d456c4eba1e1c93dbec41434e9b6150?s=140&d=retro
Submitted by
Karen Balkin
over 2 years ago


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.

419 points
C0e98b352ad3eee295b50e755757b821?s=140&d=retro
Submitted by
Tenn1518
about 2 years ago

1 Comment

593d545c83696644420003b7_64554016 stetim94 about 2 years ago

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