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 HTML Text Paragraphs and Headlines

Grigorij Schleifer
Grigorij Schleifer
10,365 Points

HTML beginner question ...

Hi folks,

what is the meaning of this lines:

<!doctype html/>

<meta charset="utf 8"/>

Thanks a lot :)


Grigorij Schleifer
Grigorij Schleifer
10,365 Points

Hey Tobias, thanks !

See you in the forum :)

1 Answer

Tobias Helmrich
Tobias Helmrich
31,602 Points

Hey Grigorji,

<!doctype html>

(note that it's not a tag so don't write it as a self-closing tag with a / in the end) is the doctype declaration in HTML5 which basically tells the browser that this document is a HTML document so it can interpret the document correctly.

<meta charset="utf-8">

gives browsers and search engines meta information about the HTML document. (Note here that there should be a - between utf and 8). In this case you specify the character encoding in this document which is UTF-8. UTF-8 can encode all possible characters in unicode.

If you have further questions feel free to ask! :)