Basic HTML code of Mac?
I just purchased a Macbook Laptop. I'm trying to save my very basic lines of code in Textedit, but even when I save it as .html, it shows up in both safari and firefox just displaying the code, not the way I formatted it in the html coding. Following is the code:
<html>
<head></head>
<title>Web</title>
<body> Hello </body>
</html>
when i open the document in firefox, it simply reads code for code, rather than just "hello". What am i doing wrong?
Public Comments
- I tried it and didn't have an issue. The only thing I did differently is added an <h1></h1> tag around 'Hello'. Is the icon for the file a small page with a Safari image?
- John goto properties and save as properties to IE
- On the save screen did you choose ALL FIiles? Not textedit files? Just a guess as I have no clue about macs but I think it will help :)
- Maybe you're Saving the document wrong. I just ran your code and it works. Clue: You have to use a text editor to format the extension. It's not a word processor format. You probably have the option to Save As a text document. That's what you need. Save as html.html Works.
- Try using this code to do that then. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Web</title> </head> <body>Hello </body> </html> It seems to me that your title tag there should be within the head and you should also always declare the DTD as well.
Powered by Yahoo! Answers