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 trialAnita Amini
6,389 PointsWhen 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.
6 Answers
Wayne Priestley
19,579 PointsHi 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 &
welcome".
The &
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 '
by the way.
So you would type " It's
" to get "It's "
Hope this helps, just ask if you want to know more.
Anita Amini
6,389 PointsHi Wayne
Thank you for answering this so well, appreciate it ;)
Umar A
4,041 PointsHi 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
5,258 PointsCan you provide us with your code, so we could have a better look at it?
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
6,389 PointsThank you Umar Alkhamis.
Geoff Parsons I am using Brackets. But I tried it with sublime text too. Thank you.
Khaleel Hamid
5,258 PointsFrom Umar code, do you have it working now?
Anita Amini
6,389 PointsHi 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
5,258 PointsWhat are you using for coding this?
Geoff Parsons
11,679 PointsGeoff Parsons
11,679 PointsWhat editor are you using when writing your markup?