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 HTML Links Anchors

How do italicize attributes on a Mac?

How do italicize attributes on a Mac? When I highlight and press command i, it italicizes the entire document. Are the italics necessary?

7 Answers

Robyn Goodwin
PLUS
Robyn Goodwin
Courses Plus Student 10,009 Points

<i> </i> around your attributes. Are you in a code challenge?

I'm coding in TextEdit. On the Treehouse video, it shows attributes like lang and charset in italics. But I can't get my Mac to just italicize individual characters. It wants to italicize the whole document. And the links aren't rendering correctly in my browser.

Robyn Goodwin
Robyn Goodwin
Courses Plus Student 10,009 Points

Is there a way to post your code here? If so that might help us help you. Just copy your code, paste it in the comment space and put a backward hashtag at the beginning and end. The backward hashtag- ` -is the bottom character on your ~ key.

Here is my code, followed by the error message I get when I try to view it in my browser:

<a> href=“index.html”>Go Back</a>

Here is the error message:

href=“index.html”>Go Back

Robyn Goodwin
PLUS
Robyn Goodwin
Courses Plus Student 10,009 Points

You have a closing bracket on your first <a

it should read: <a href="index.html">Go Back</a>

Robyn Goodwin
PLUS
Robyn Goodwin
Courses Plus Student 10,009 Points

If you wanted the Go Back text in italics it would look like this:

<a href="index.html"><i>Go Back</i></a>

But to answer your initial question, no italics are not necessary.

Milo Winningham
seal-mask
.a{fill-rule:evenodd;}techdegree
Milo Winningham
Web Development Techdegree Student 3,317 Points

The italics you're seeing in the video (and the colors too) aren't really a part of the code — this is called syntax highlighting. TextEdit doesn't do this as it wasn't designed for editing code, but TextMate (the editor shown in the video) and many other editors have this feature. By displaying different parts of the code in different colors and formatting, it's easier to skim through lots of code quickly and notice small errors.

In your code there are two errors. First of all, as Robyn mentioned, there is an extra right angle bracket after your <a. Second, the quotation marks around index.html are curly/smart quotes like “this” instead of "this". Recent versions of Mac OS X do this automatically in TextEdit, so I'd recommend using a different text editor such as Brackets or Sublime Text, which have many features that will help when writing code.

Eureka -- it works now! Thank you so much, Milo and Robyn!