trackdude Posted September 2, 2015 Share Posted September 2, 2015 I thought I'd do some review and practice, but my browsers aren't translating the html code. When I create my html doc using the practice samples in the tutorials, I get a page of typed text:<!doctype html><html><body><h2>Practice Heading</h2></body></html>I just get what I typed displayed. I'm perplexed. Any thoughts??I'm using TextEdit, Mac, tried three browsers (Safari, FireFox, Chrome) with samr results. Weird. Link to comment Share on other sites More sharing options...
Don E Posted September 2, 2015 Share Posted September 2, 2015 Are you saving the file with a .html extension? TextEdit should have the option of saving the file as a .html extension. 1 Link to comment Share on other sites More sharing options...
trackdude Posted September 2, 2015 Author Share Posted September 2, 2015 (edited) Are you saving the file with a .html extension? TextEdit should have the option of saving the file as a .html extension. Yes, using .html extension. EDIT: Ok, I just tried something (being desperate and annoyed). I deleted the <!DOCTYPE html> from my practice file and now it displays correctly. What the heck is going on??? Edited September 2, 2015 by trackdude Link to comment Share on other sites More sharing options...
dsonesuk Posted September 2, 2015 Share Posted September 2, 2015 Go to texteditor preferences and make sure the format for plain text is selected NOT rich text. Link to comment Share on other sites More sharing options...
Don E Posted September 2, 2015 Share Posted September 2, 2015 Try what dsonesuk suggested and upon saving, make sure in the Save As: field you save the file with the .html extension. Plain Text Encoding field should have Unicode (UTC-8) selected for you. If no extension is provided, the file will default to .txt instead of .html. Works on my system. Link to comment Share on other sites More sharing options...
davej Posted September 2, 2015 Share Posted September 2, 2015 You can see the file extension, right? Microsoft (in its infinite insanity) hides known file extensions by default, unless you adjust the folder options. Link to comment Share on other sites More sharing options...
dsonesuk Posted September 2, 2015 Share Posted September 2, 2015 poster is using Mac not windows post#1 Link to comment Share on other sites More sharing options...
trackdude Posted September 2, 2015 Author Share Posted September 2, 2015 Just wondering, when I save as html., does that default to plain text. I ask because in the Format menu of the html doc I working with now implies that my doc IS Simple text. Go to texteditor preferences and make sure the format for plain text is selected NOT rich text. UTC-8 is selected. Files are saving as .html Try what dsonesuk suggested and upon saving, make sure in the Save As: field you save the file with the .html extension. Plain Text Encoding field should have Unicode (UTC-8) selected for you. If no extension is provided, the file will default to .txt instead of .html. Works on my system. No, we're good here on that point. You can see the file extension, right? Microsoft (in its infinite insanity) hides known file extensions by default, unless you adjust the folder options. Thanks guys, it's working w/o the !DOCTYPE. Go figure. Link to comment Share on other sites More sharing options...
dsonesuk Posted September 2, 2015 Share Posted September 2, 2015 Trouble is, you require doctype to identify that it is html5 for browsers to render correctly. check out http://computers.tutsplus.com/tutorials/quick-tip-configure-textedit-for-coding-html--mac-44786 for correct settings. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now