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 Introduction to HTML and CSS (2016) Adding a New Web Page Test: Write and Style an Element

how do i set up my HTML site with my <!doctype> and <html>?

I am taking the test to start a html web page but i'm stuck I entered <!doctype> and <html></html> adn it keeps saying its wrong.


2 Answers

John Cotter
John Cotter
2,489 Points

Hi Tifara




Hope this helps and good luck

Jamie Reardon
.a{fill-rule:evenodd;}techdegree seal-36
Jamie Reardon
Treehouse Project Reviewer

HI Tifara, like John posted the basic structure of a web page including the <!DOCTYPE>

<!DOCTYPE html>
    <meta charset="utf-8">
    <title>Your Page Title</title>

    Your content goes here!
  • <!doctype html> - This piece of code let's the browser know that asking it to display an HTML document.
  • <html> - All of your code must be between the html opening and closing tags.
  • <head> - Holds all the important behind-the-scenes information about your web page, like the title of your web page, and a links to a CSS stylesheets.
  • <meta> - This meta tag basically specifies which character set a website is written with.
  • <title> - Stuff between title tags doesn't appear on the web page, but you'll see it in search engine results and browser tabs.
  • <body> - Everything that displays in the browser - header, navigation, images, content - goes between the body tags.