Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML How to Make a Website HTML First Use HTML Elements

line 2

what is line 2?

index.html
<!DOCTYPE html>
<meta html> <charset="ufc 8"> 
  <head></head>
    <body></body>
  <html>

1 Answer

Codin - Codesmite
Codin - Codesmite
8,600 Points

It is a meta tag, the syntax is incorrect though (Or atleast I have never seen it written in that way.)

Correct syntax to my understanding:

HTML4.01:

<meta http-equiv="content-type" content="text/html; charset=UTF-8">

HTML5:

<meta charset="UTF-8">

It should also be inside the head tag.

Like so (I have added some other Meta Tags as examples (There is a lot more than in my example that can be used):

<!DOCTYPE html>
    <html>
        <head>
            <meta charset="UTF-8"> <!-- Meta Tag that tells the browser which character encoding the webpage uses in this case it is UNICODE -->
            <meta name="keywords" content="HTML, CSS3, panda, bamboo"> <!-- Meta Tag that lists keywords for search engines searchs -->
            <meta name="description" content="This is an example description"> <!-- Meta tag that sets description for the contents of the page -->
            <meta name="author" content="Conrad Alverson"> <!-- Meta Tag that defines the author of the page -->
            <meta http-equiv="refresh" content="15"> <!-- This Meta Tag will refresh the page every 15 seconds or whatever value you place in content -->
        </head>
        <body>
            <p>Example Content</p>
        </body>
    </html>