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

Hello everyone I am stuck once again at this task. I thought I did it right the first time, Please Help.

Can not seem to get pass this task.

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

    <h1>Welcome to My Web Page!</h1>

  </body>
</html>
styles.css
  <h1> purple </h1>

2 Answers

You didn't include the task at hand, but the problem probably comes from your CSS.

You see, the syntax of HTML and CSS are much different.

Your HTML seems good, but CSS doesn't use the same sort of selectors, namely the pointy brackets.

Whereas yours looked like this:

<h1> purple </h1>

CSS looks like this:

[element] {
    [selector]: [value];
    [selector]: [value];
}

and so on. or in your case it would look like this:

h1 {
    color: purple;
}

Semicolons being very important

Ari Misha
Ari Misha
19,323 Points

Hiya David! Just follow the css syntax for styling the elements on your HTML page and link the stylesheets in the "<head>" element of the page. To pick an element on a HTML page in your corresponding css, just follow the syntax like this:

h1 {
  color: purple;
}

Notice the element name , followed by curly braces, and css property and its value you wanna style that element with . I hope it helped. (: