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

Domnick Knowlton
Domnick Knowlton
1,904 Points

Can someone please help me with code validation?

Okay, so I am the part where I need to validate my code from W3Validated but I get this weird errors. I will give the link to my website so you can inspect the element and check the CSS and HTML and help me solve my code. Also this is miscellaneous and very difficult but, I am trying to make my images into a two column layout and make them bigger. If you could help me solve that, it would be amazing.

http://web-f2sdpy98ay.treehouse-app.com/

3 Answers

I had the same problem. Check your google-font code. It should be in the header. Url encode the | (pipe characters) in the href attribute (%7C):. That did it for me. Here is a great resource : http://stackoverflow.com/questions/22466913/google-fonts-url-break-html5-validation-on-w3-org. Let me know if you have more problems, would love to check your code.

Domnick Knowlton
Domnick Knowlton
1,904 Points

How would I implement the actual CSS Font-Family?

Nicolas Wolf
Nicolas Wolf
11,607 Points

So, I'm not sure about that font link. I normally use the ones provided in "quick use" try this one:

<link href='http://fonts.googleapis.com/css?family=Devonshire' rel='stylesheet' type='text/css'> 

Also, it's generally bad form to use P tags inside A tags. You've got a few of those in your lists. Simply take this:

<a href="Images/Ballista.jpg">
                <img src="Images/Ballista.jpg" alt="ballista">
                <p>This is a photo of the Black OPS II Marksmen rifle "Ballista."<p>
              </a>

and make it this... oh, and don't forget the quote symbols.:

<a href="Images/Ballista.jpg">
                <img src="Images/Ballista.jpg" alt="ballista">
                This is a photo of the Black OPS II Marksmen rifle &quot;Ballista&quot;.
              </a>

If you want to make all your text of a uniformed style and get rid of the default link styles, you can try styling the text of them both simultaneously such as:

p, a {
  text-decoration: none;
  font-family: 'Devonshire', serif;
  font-size: 1.0em;
  color: black;
}
Domnick Knowlton
Domnick Knowlton
1,904 Points

Now, I need help passing the W3 Validator test on my Contact.html Page

http://web-f2sdpy98ay.treehouse-app.com/about.html

Nicolas Wolf
Nicolas Wolf
11,607 Points

The w3c validator is telling you everything you need to know about how to fix your code here. Short of doing your work for you, there's nothing I can tell you that the validator isn't saying already.

Keep an eye out for nesting errors. It looks like you might be typing additional ending tags after an auto-complete has already entered them in for you. Also, take a brief look at the code before you load it in a browser and check for basic errors. Treehouse's editor, along with the 3rd-party editors they endorse, make it quite easy to spot these sorts of issues.