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 How to Make a Website Adding Pages to a Website Add a New Page

Anita Amini
Anita Amini
6,389 Points

When I use apostrophes in words such as It's, I get the following: it’s. Why is this happening and how can I fix it?

I am trying to write It's in <p> and I get It’s instead.

Also, when I separate two paragraphs by putting them in separate <p> and </p> the next paragraph comes right below the first paragraph instead of inserting a blank line between the two paragraphs like in the video.

eg:

<p>Hi there.</p>
<p>I am writing in HTML</p>

what I get:

Hi there. I am writing in HTML (no space between the 2 paragraphs)

Many thanks.

What editor are you using when writing your markup?

6 Answers

Wayne Priestley
Wayne Priestley
19,579 Points

Hi Anita,

What you need to do is add the html symbol code instead of the charicter your trying to I put.

The reason for this is because there are charicters we use when writing text, such as an ampersand or apostrophe that are also used in html to write code and the browser doesn't know the difference between them.
For example, if I wanted to write "hello & welcome" in my paragraph I would actually write " hello &amp; welcome".

The &amp; is the symbol code for a ampersand so the browser would insert & instead of the jumbled up symbols you sometimes see.
There are codes for every symbol and you can take a look at them here or Google html charicter reference to find sites that list more.
The code for an apostrophe is &apos; by the way. So you would type " It&apos;s " to get "It's "

Hope this helps, just ask if you want to know more.

Anita Amini
Anita Amini
6,389 Points

Hi Wayne

Thank you for answering this so well, appreciate it ;)

Hi Anita,

paragraph tags are like this

<p>This is some text</p>

You shouldn't put numbers beside them. They're not like h1-h6. By removing the numbers. The two paragraphs will be in two different lines.

Khaleel Hamid
Khaleel Hamid
5,258 Points

Can you provide us with your code, so we could have a better look at it?

Anita Amini
Anita Amini
6,389 Points

<body> <div class="container"> <p1>Hello it's a nice day. When I look in the browser it's looks like: it’s</p1> <p2>I like coding.</p2> </div> </body>

(no line break between p1 and p2.

thank you!

Anita Amini
Anita Amini
6,389 Points

Thank you Umar Alkhamis.

Geoff Parsons I am using Brackets. But I tried it with sublime text too. Thank you.

Khaleel Hamid
Khaleel Hamid
5,258 Points

From Umar code, do you have it working now?

Anita Amini
Anita Amini
6,389 Points

Hi Khaleel Hamid, the paragraph issue was resolved as I removed the number but the apostrophe problem is still there, I still get it’s instead of it's.

Thanks!

Khaleel Hamid
Khaleel Hamid
5,258 Points

What are you using for coding this?