Issue
It just appears like this in Google Chrome:
<html>
<head>
<title>Hello World!</title>
</head>
<body>
<h1 align="center">Hello World!<br/>Welcome to My Web Server.</h1>
</body>
</html>
Why isn't it transforming as expected?
Edit: Yes the file does have an .html filename. I'm not sure it should need a header yet according to a tutorial I'm using which says that it should render correctly without one? All new to this so I'm unsure.
Edit: When I open it with textedit, I get this:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<meta name="Generator" content="Cocoa HTML Writer">
<meta name="CocoaVersion" content="1038.35">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
</style>
</head>
<body>
<p class="p1"><html></p>
<p class="p1"><head></p>
<p class="p1"><title>Hello World!</title></p>
<p class="p1"></head></p>
<p class="p1"><body></p>
<p class="p1"><h1 align="center">Hello World!<br/>Welcome to My Web Server.</h1></p>
<p class="p1"></body></p>
<p class="p1"></html></p>
</body>
</html>
I don't remember saving it like this at all.
Solution
How did you create the web page? It is possible that the editor that you used converted the html so that it shows "<" instead of rendering them
Open the file in notepad, check that the contents are:
<html>
<head>
<title>Hello World!</title>
</head>
<body>
<h1 align="center">Hello World!<br/>Welcome to My Web Server.</h1>
</body>
</html>
and not
<html>
......
</html>
make sure you save your file with a .html extension
Answered By - Ian G
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.