Recommended Posts

I am trying to make a simple test page. I have written the following code with a text-editer. I saved the file with this name mytestpage.html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>this is my test page</title>
</head>
<body>
<p>
this should appear
</p>
</body>
</html>

when I navigate to this page using my web browser it just displays all of the code above. I was expecting it to just display "this is my test page"

edit added later//

I also have the file saved as this mytestpage.html

Edited by shanenin
Link to post
Share on other sites

I figured out the problem. I had used nvu, I thought I was in source code mode, but I was not(was in wysiwyg mode), so the actual code of the file was

shane@mainbox ~ $ cat mytestpage.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
<title>my-test-page</title>
</head>
<body>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><br>
<html xmlns="http://www.w3.org/1999/xhtml"><br>
<head><br>
<title>this is my test page</title><br>
</head><br>
<body><br>
<p><br>
this should appear<br>
</p><br>
</body><br>
</html>
</body>
</html>

Edited by shanenin
Link to post
Share on other sites

Glad you were able to figure that out,

Just so you know, when using a combo editor like that it is always a good thing to make sure you are in source code mode if you are putting the source in completely. I know with Nvu, and any other wyswyg editor, when you start a new file the main template, as shown below, is already in place.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
<title></title>
</head>
<body>
<br><br>
</body>
</html>
</body>
</html>

so if you don't see that when you start a new file then you are in wyswyg mode or preview mode. if you see that then you are in source mode.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...