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

CSS How to Make a Website Beginning HTML and CSS Write a CSS Selector and Property

When I put in my headline element, my name does not show up up in my workspace.

I did it before and it worked perfectly

index.html
<body>
    <h1>Nick Pettit</h1>
</body>

1 Answer

I'm not sure why isn't showing up. The only think that could be happening is if you have a css applied to your h1 element tag setting the color to white. Then you can't see it because the background is white. If you don't have any css, try applying some css to the h1 to change the color.

so your index.html should look like this:

<!DOCTYPE html>
<html>
<head>
    <title>Your Title Here</title>
<link rel="stylesheet" type="text/css" href="css/main.css">  <!-- Make sure you're linking the css file into your html file -->
</head>
<body>
   <h1>Nick Pettit</h1>
</body>
</html>

and your css like this:

h1 {     /*This is a CSS Selector, you're selecting the h1 element tag on your html file*/

color: royalblue;  /*Or any color that you want.*/

}

For a list of colors that you can use visit this link: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value

Forget all i said above OR read if you like to learn more.

Read what i said above if you would like to see how you would do it in the future.

this is how your html should look:

<body>
    <h1>Nick Pettit</h1>

  <style>  /*Use the Style tag so you can apply  internal css to your html file. */


    h1 {         /*  CSS Selector, you're selecting the h1 element tag in your html file.  */

     color: green; /* property: value;   =  color: green; */

    }

  </style>
</body>