Solved

Page shows code instead of formatted text and images 130111

Posted on 2013-01-11
4
440 Views
Last Modified: 2013-01-15
Hello expert,

Created an html page to help sell my house.
http://www.allenpitts.com/7147/7147_Flyer.html

Got several calls from prospective buyers saying:
'The page display as html code.'
When I tested at my computer (IE 9) it works fine.
But using Firefox it displays code and so also on the
iPhone.

I tried using HTM in instead of html and removed

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

No luck, I surmise that the browser, when it display code,  
thinks the file is text instead of html code but not sure how
to get it to display.

Allen in Dallas
0
Comment
Question by:9apit
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 10

Expert Comment

by:stu215
ID: 38768692
I just tried in Firefox v17.0.1 & IE 9 and it works fine... It does not work in Safari v5.1.2 though.

The markup all seems correct.

What kind of server are you hosting this file on? or do you use a hosting company?
-- I've seen something similar where I had a client trying to host his website on a NAS device.

Assuming it is on a NAS device and not an actual webserver:
They make files accessible on the web but are not true webservers and do not interpret the HTML as html... The reason it would work in some browsers is because some newer browsers are smart enough to do the interpretation themselves.
0
 
LVL 10

Expert Comment

by:stu215
ID: 38768713
Had another thought that you may be correct if you did it on a windows machine in notepad and then made the extension .html it wouldnt have really changed the extension and may be interpreted as text like you think.

To check on a win 7 machine:

Go to Start Menu -> Control Panels -> Folder Options -> "View" tab

and then UNcheck "hide extensions for known file types"

This will then show the full extension on the file and you should be able to modify it to just:
fileName.html
0
 
LVL 13

Accepted Solution

by:
Ugo Mena earned 500 total points
ID: 38768825
no character encoding or parsing mode is detected.

The pragma directive should be used for pages written in HTML 4.01. It should also be used for XHTML 1.x documents served as HTML, since the HTML parser will not pick up encoding information from the XML declaration.

Use a pragma directive at the top of the head element.

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

Correct this and then you can double check yourself with the following HTML validator:

http://validator.w3.org
0
 

Author Closing Comment

by:9apit
ID: 38780509
Didn't work but the best answer I got
0

Featured Post

The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question