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

Louise Tan
Louise Tan
154 Points

how to write CSS code

how to write css code

index.html
<!doctype html>
<html>
  <head>
    <link href="styles.css" rel="stylesheet">
  </head>
  <body>
 <h1>
    <p>Welcome to My Web Page!
   </p>
   Portforlio>
    </h1>

    <div styles:red ; fonts size: 14px; align: centre>
  </body>
</html>
styles.css
<!doctype html>
<html>
  <head>
    <link href="styles.css" rel="stylesheet">
  </head>
  <body>
 <h1>
    <p>Welcome to My Web Page!
   </p>
   Portforlio>
    </h1>

    <div styles:red ; fonts size: 14px; align: centre>
  </body>
</html>

1 Answer

This task doesn't want you to add any of your own code, just to change whats already written

Change the HTML paragraph tag to an h1 tag.

All that this is asking you to do is change this:

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

To This:

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

This has changed it from a paragraph tag to a heading 1 tag (h1). This is all that needs to be done in the index.html file (You do not need to add any extra tags). For task 2 you need to go into the styles.css (the tab next to index.html) file and change this :

h1 {
  color: blue;
}

To this:

h1 {
  color: purple;
}

This will change all of the h1 tags to be purple instead of blue without you having to add anymore of your own code