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) Getting Familiar with HTML and CSS Test: Changing the Look of a Web Page

Thought this was correct?

changed to h1{color: purple;} and response is to drop the quotes?

index.html
<!doctype html>
<html>
  <head>
    <link href="styles.css" rel="stylesheet">
  </head>
  <body>

    <h1>Welcome to My Web Page!</h1>
    h1 {
  color: purple;
}
  </body>
</html>
styles.css

4 Answers

Muhamed Asil
Muhamed Asil
7,453 Points

you should type the css code inside (styles.css) file

challenge 2 of 2 style.css

h1 {
  color: purple;
}

Is this not the same?

Muhamed Asil
Muhamed Asil
7,453 Points

there's a difference between HTML and CSS. and there many ways also to type CSS code.

i am not following you?

Austin Whipple
Austin Whipple
29,725 Points

Hi Alan,

HTML (HyperText Markup Language) is the code you write to build out the structure of the page. Basically telling the browser to display a heading (h1) at the top of the page, followed, perhaps by an image (img), or paragraph of text (p). This code, without any styles applied, produces a rudimentary website.

CSS (Cascading Style Sheets) adds a style layer to the HTML you've created. The CSS you write applies color, alignment, size, and other attributes to spruce up the display of your website. Keeping style (CSS) away from content (HTML) is a fundamental best practice to web development.

So in this challenge, you need to be sure you're declaring your heading styles in the styles.css document rather than index.html. Your index.html file should only contain the content you'd like to display with the basic HTML markup (which, in the head, tells the browser to check styles.css for that other design layer and apply it).