Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

HTML Build a Simple Website Creating a Website Structure Using Classes

Tommy Gebru
Tommy Gebru
30,151 Points

Creating a Website Structure

I am not understanding whats going on? I have been focused for the past 40 minutes and need to ask for help where does my code need tweaking?

Could you share your code, as without seeing it I am unable to posit why it is not doing as expected. You can add code to the forum using MarkDown link below comment box in bold :)

Tommy Gebru
Tommy Gebru
30,151 Points

Not sure how to place a screenshot as a comment nor can i highlight copy +paste the code

Why can you not copy and paste the code? Could you type in it then otherwise I don't know where you are going wrong. What is the question you are on? :)

Hi Teame,

If you look to the bottom right of the text box you will see something that says Markdown Cheetsheet. If you don't understand that maybe this will make sense: How to display code at Treehouse

Jeff

Tommy Gebru
Tommy Gebru
30,151 Points

// Okay so I used the shortcuts and now copy +paste works! My question now is task 1 and how to complete it.

html
<!DOCTYPE HTML>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title>Smells Like Bakin' Cupcake Company</title>
  <link rel="stylesheet" href="css/normalize.css" type="text/css" media="screen">
</head>

<body>
  <div id="featured-cupcake">
    <h2>Cupcake of the Week</h2>
    <img src="img/featured-cupcake.jpg">
  </div>
</body>
</html>

2 Answers

Excellent, right I edited your post to add the correct MarkDown if you click edit now you can see how I did it. So the question says to add a DIV around the featured cupcake element and add the CLASSES container and clearfix. So the code below is how it is done.

<!DOCTYPE HTML>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title>Smells Like Bakin' Cupcake Company</title>
  <link rel="stylesheet" href="css/normalize.css" type="text/css" media="screen">
</head>

<body>
  <div class="container clearfix">                    // This line opens the div and adds the classes
    <div id="featured-cupcake">
      <h2>Cupcake of the Week</h2>
      <img src="img/featured-cupcake.jpg">
    </div>
  </div>                                                           // This line closes the div
</body>
</html>

Does this clarify it for you?

Tommy Gebru
Tommy Gebru
30,151 Points

How do post my code to the forum the way you did (its presentation and colors)

If you click edit on the answer you placed below I have edited to add correct formatting. But basically it's a blank line then () followed by the language ie (html) then a new line add your code then a new line (```) That's it :) Teame Gebru

Tommy Gebru
Tommy Gebru
30,151 Points

Edited by @Adam Sackfield

<!DOCTYPE HTML>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title>Smells Like Bakin' Cupcake Company</title>
  <link rel="stylesheet" href="css/normalize.css" type="text/css" media="screen">
</head>

<body>
  <div id="featured-cupcake">
    <h2>Cupcake of the Week</h2>
    <img src="img/featured-cupcake.jpg">
  </div>
</body>
</html>