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

Connor Pelzel
PLUS
Connor Pelzel
Courses Plus Student 3,031 Points

Idk how to make the H1 selector with the proper brackets

Where within the code do I put the H1 selector at?

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

1 Answer

Robert Gouveia
PLUS
Robert Gouveia
Courses Plus Student 1,714 Points

Hi, it means doing inline css.

These courses really should not be promoting inline css, all css should be within a style sheet to be honest.

But here is the example of what you need.

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

    <h1 style="color:purple;">Welcome to My Web Page!</h1>

  </body>
</html>

Notice the style and the color purple.

But this is not a good practice and wish they would not teach people this as this was done 10 years ago and only bloats the html.

Anyway hope this helps