Jump to content

I'm stumped on something simple (I think)


trackdude

Recommended Posts

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

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 by trackdude
Link to comment
Share on other sites

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...