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

Absolute Madness

I'm just starting the Web Designer adventure and I'm having two issues already. First I added a title tag, but it doesn't show up in the browser (I'm using Chrome), secondly, The logo will not show up at all, but I have, as far as I know added it properly. Here is the code (please treat the parenthesis as ankle brackets):

(!DOCTYPE HTML)

(html)

(head)

(meta http-equiv="Content-Type" content="text/html; charset=utf-8/)

(title)Smells Like Bakin' Cupcake Company(/title)

(/head)

(body)

(img src="img/logo.gif")

(ul class="nav")

(li)(a href="#")About(/a)(/li)

(li)(a href="#")Cupcakes & Prices(/a)(/li)

(li)(a href="#")Locations(/a)(/li)

(li class="last")(a href="#")Contact Us(/a)(/li)

(/ul)

(div id= "intro") (h1) We make cupcakes, and we're hipsters...(/h1)

(p)(a href="#" class=btn)Browse Our Cupcakes(/a)(/p)

(/div)

(img src= "img/you-bake-me-blush.gif"You're baking me blush")

(div id= "featured cupcake")(h2)Cupcake of the week(/h2)

(/div)

(/body)

(/html)

If anyone could tell me what it is that I'm doing wrong, I'd very much appreciate it.

3 Answers

dunno why the 2nd example didnt show up but here it is

<head>
<title>Awesome title here</title>
</head>

p.s. and btw the instructor for the html deep dive isn't named Nick sorry =(. But go through it anyway before continuing the web designer adventure.

Thank you again Nick. Extraordinarily helpful! I was so frustrated at the fact that nothing was working like it should that I just stopped doing the lessons. Will you... be my web mentor?

haha I think there are other members here who i think are more qualified than I am but I'm always happy to help out any way I can. I know your frustration and I'm sure others can relate. I'm motivated to help cause I hated being in those situations. Just keep your head up and when you get stuck the community and I are here to help =).

you need to put all of your code in, not just <!doctype html>

Sorry about that. Didn't realize that the text box would actually read the tags. Please take another look.

are you using ( ) to open and close tags?? or are you just using them for the post?

It should be:

<!DOCTYPE HTML> <html> head> meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> title>Smells Like Bakin' Cupcake Company</title> /head>

   <body>       
      <div class="container clearfix">      
        <img src="img/logo.gif">
      </div>        
   </body>

</html> I took out the opening tag brackets < in the head so you could see

Yea try using MarkDown to paste your code so we can see what you're working with.

How to use Markdown

I'm with Chris M.....I don't think you're using ( ) for your tags right?

<title>Web Title Goes Here</title>

(p)(a href="#" class=btn)Browse Our Cupcakes(/a)(/p)

you're missing the quotation marks for class="btn" should be

<p><a href="#" class="btn">Browse Our Cupcakes</a></p>

And your img path runs into your alternative text

(img src= "img/you-bake-me-blush.gif"You're baking me blush")

seperate them and it should be like

<img src= "img/you-bake-me-blush.gif" alt="You're baking me blush">

Hey Nick. Thank you so much. That's extremely helpful.

I have two quick questions.

1.) Does indentation, and spacing matter at all when typing code?

2.) Do you see anything wrong with the title tag? Does the title have to be in a particular location in order for the inserted text to appear in the browser tag. When I open this document it just says "index" instead of the text I entered into the title tag.

Again, thank you so much.

Hi Alan,

  1. In terms of html, indenting doesn't matter because the browser will still interpret it the same. Spacing however is important. Indenting helps out a lot when trying to track down errors and syntax problems and it keeps you organized. Plus other developers frown on ugly code. Improper spacing can confuse the browser just like the alt attribute in your img tag from your original question above.

For example,

<div id="sample"<div class="sample2">
<h1>Heading 1</h1><p>
Description goes here edit me!<p>
</div>

vs

<div id="sample">
    <div class="sample2">
        <h1>Heading 1</h1>
        <p>Description goes here edit me!</p>
    </div>
</div>

In the first example you might end up missing closing tags which will result in weird things happening to how your site looks. You'll see =) In the latter example you can see where each div, h1 heading and p tags start and end making it easier to edit, make corrections or add extra stuff if necessary.

  1. I don't see anything wrong with your title tag. As long as you have both opening and closing tags and it's nested inside your <head> tag then its fine like so.

    <head> <title>Awesome title here</title> </head>

I would recommend going through the html deep dive to learn more info on html and why certain things are the way they are. Nick does a good job showing the basics and explaining it all.