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 trialdelaram abdollahzadeh
1,523 PointsEncoding problem in textedit
This is my code in mac text edit: <!doctype html>
<html lang=“en”> <head> <meta charset=“utf-8”> <title>My Page</title>
</script> </head> <body>
<p>hello</p>
<iframe width=“300” height=“300” src=anotherpage.html></iframe>
</body> </html>
This what is show in the page source file: <!doctype html>
<html lang=“enâ€> <head> <meta charset=“utf-8â€> <title>My Page</title>
</script> </head> <body>
<p>hello</p>
<iframe width=“300†height=“300†src=anotherpage.html></iframe>
</body> </html> How can I fix this?
Thanks a lot for your help in advance
2 Answers
Jason Anello
Courses Plus Student 94,610 PointsHi delaram,
textedit is a word processor and not a dedicated text editor. You can configure it to work with text files but it might be better in the long run to switch to a real text editor. Sublime text is one.
Do a search for "mac text editors".
Christian Frick
14,586 PointsThe Code need to look like:
<p>hello</p>
<iframe src="anotherpage.html" width="300" height="300" ></iframe>
delaram abdollahzadeh
1,523 Pointsthanks Christian, yes i know, i have only removed the quotation marks in order for it to work !!! otherwise like other parts of the code my source would have had weird characters instead of the " marks.
For now I have removed the " before and after the utf-8. but I think there should be a right way to fix this!
delaram abdollahzadeh
1,523 Pointsdelaram abdollahzadeh
1,523 PointsThanks Jason.