View Single Post
  #1 (permalink)  
Old December 17th, 2011, 01:18 AM
WizardElsontro WizardElsontro is offline
Registered User
 
Join Date: Dec 2011
Posts: 1
Thanks: 0
Thanked 1 Time in 1 Post
Default Beginning HTML, XHTML, CSS, and Javacript Page 17 I need help

I am trying to do figure 1-11 from scratch, but I need help:


<html>
<head>
<title>Creating Preformatted Text Using the <pre> Element</title>
</head>
<body>
<p>The following text is written inside a <pre> element. Multiple spaces should be preserved and the line breaks should appear where they do in the source doucment.</p>
<pre>
function testFunction(strText){
alert (strText)
} </pre>
<p>The content of the <pre> element is most likely displayed in a monospaced font.</p>
</body>
</html>

What am I doing wrong? Why is more code other than the JavaScript in Courier font,
Reply With Quote
The Following User Says Thank You to WizardElsontro For This Useful Post: