Jump to content
Larry Ullman's Book Forums

Recommended Posts

Ok I have been trying to work why my script that I have written out of the book. It is on page 4. When I test it. it comes up as html script.

Here is the script.

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3c.org/1999/xhtml" xml:lang="en" lang="en">

<head>

<meta http-equiv="content-type" content="text/html; charset=utf-8" />

<title>Welcome To this Page! </title>

<head>

<body>

<h1>This is a basic XHTML page!</h1>

<br />

<p>Even with <span style="font-size:150%;">some</span> decoration, it's still not very exciting.</p>

</body>

</html>

Thank you.

ljstott.

Share this post


Link to post
Share on other sites

The book gives you the script to do with a text editor. then you are to test the script and see if come up the same as the book shows you. In the browser I open it up from file and open the go to the file that has the script in it.

Here is the url that I have.

C:\PHP\Chapter 1\welcome.html.txt

the text editor I was using was pspad. it is a free text editor.

Share this post


Link to post
Share on other sites

You've saved the file as .txt file not .html. I've never heard of your editor if you're on windows there are a few free decent editors. I prefer Context, but there is also notepad++ too. Both for Windows. If you're happy with your editor then just renane the file and remove the .txt extension.

Share this post


Link to post
Share on other sites

I did save the file as .html. I did as the book said to do. but saving it as html in a text content puts the txt after it anyway. I have renamed the file more than once and it keeps putting the .txt on it.

I keep getting .html.txt after renaming the file.

Share this post


Link to post
Share on other sites

You need to set the editor to save it as a .html file then. Or you can rename it just in windows as .html. Failing both that try a new editor and make sure to save the file as .html

  • Upvote 1

Share this post


Link to post
Share on other sites

I have already deleted the text editor and going to install context as you have recommend.

I am also going to re-do the program again in this text editor and see if that will work.

Thank you for the advise. It has been a great help.

Share this post


Link to post
Share on other sites

Ok I installed conTEXT and redid the program and it has work well almost.

this one line of text came up.

eta http-equiv="content-type" content="text/html; charset=utf-8/>

I saved it as a html document not as a text.

I am real happy with what has happen here.

One line out of 13 is really good for someone that never did programming before.

the line of script is where the header of the page is to go.

Share this post


Link to post
Share on other sites

you are right I did miss <. When I looked at what the script was and saw the mistake and made the changes. it now work. Here is the script.

 

<!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" xml:lang="en" lang="en">

<head>

<meta http-equiv="content-type" content="text/html; charset=utf-8" />

<title>Welcome to this page!</title>

</head>

<body>

<h1>this is a basic XHTML page!</h1>

<br />

<p>Even with <span style="font-size:150%;">some</span> decoration, it's still not very exciting.</p>

</body>

</html>

Share this post


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...
Sign in to follow this  

×
×
  • Create New...