Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

HTML HTML Forms Inputs

code not translating to browser

My code from text edit has not been translating to the web browser properly. There are very weird characters that show up. For example with inputs, when I wrote:

<input type=“radio” name=“gender” value=“male”>Male<br> <input type=“radio” name=“gender” value=“female”>female<br>

This came up in the text box for both male: “male”

This also happened when I tried to link from index to another_page. Does anyone know what is causing this? Is it something with my settings?

2 Answers

Derek Hanson
Derek Hanson
7,838 Points

Your doctype is likely set wrong. Trying use the <meta charset="utf-8"> at the start of your file. It might be easiest if you include your code for me to verify it. The code should look like this. <!Doctype html> <br> <html ><br> < head><br> <meta charset="utf-8">

The weird encoding is Microsoft encoding for quotes. Unicode (UTF-8) is what will give the regular quotes.

I don't have any experience with textedit but it's advertised as a word processor. This could be your problem. You might be able to configure it to work with text files properly but it might be better to switch to a dedicated text editor like sublime text for example.