How Do I Check How My Webpage Displays?

by 36 replies
42
Hi All,
Someone just told me my website was just showing the html code.

It displays ok for me.
What is the best way to check this, then fix it?

Thanks!
Gordon
#main internet marketing discussion forum #check #displays #webpage
  • View through another browser i.e. IE or FF.... regards Allen

    PS To fix, you probably need to share URL so people can assess....
    • [1] reply
  • This shows up as html code only, i.e. using Firefox.
    • [1] reply
    • Interesting.

      In Chrome - I just see HTML

      In IE, of course, I see your web page
  • I use FireFox and there's just HTML...
  • Banned
    Ok ... it worked in IE but not in Firefox. I copied the code into dreamweaver and cleaned up some html, although not all that I could have cleaned up and it now works on plrstyle.com/test.html

    Email me at suzbuc AT gmail DOT com for the corrected page. I will be deleting this as soon as you see it work.
    • [ 1 ] Thanks
  • The problem is that your webserver isn't sending out any HTTP headers.

    Naturally, IE works as it doesn't like to conform to web standards and will assume any HTML is to be rendered as a webpage.

    The question is what you've done to your webserver and how to fix it.

    What level of administration of your webserver do you have?
    • [1] reply
  • You are missing the first 2 lines which tell the browser how to display the content.

    <!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">
    • [1] reply
    • Could you Firefox folks do me a favour and check if it's displaying now?
      Thanks.
      • [1] reply
  • Your first body tag should be using hexadecimal code instead of the word of the color you want your background.

    So your body tag should read: <BODY bgcolor="#000000"> (#000000 is for black).
    • [1] reply
    • Banned
      but that mistake will not make the site do what it is doing. You can see the code I use here and it works

      plrstyle DOT com/test.html
      • [1] reply
  • Why are you using a frameset to display your data?

    What are you using to add the contents? It looks like you have entered the HTML into the designing section instead.
    • [1] reply
    • The frameset comes from forwarding the domain to a page on the site - I'm wondering if that's part of the problem. It used to be forwarded without masking, but I changed it to forwarding with masking.
  • I'm not sure, but I've just noticed that you aren't using CSS and you have a lot of errors in your code. For instance "<TABLE border=0 cellPadding=0 cellSpacing=0 width=800>" should be "<TABLE border="0" cellPadding="0" cellSpacing="0" width="800">"

    What are you using to add your content?
    • [1] reply
    • Thanks Mike - so should all elements following the = sign have " " around whatever the variable is?


      I edit content in notepad.
      Cheers,
      Gordon
      • [1] reply
  • Banned
    Still not fixed. You should contact your host for support. The page displayed on my server and not on yours in Firefox.
    • [ 1 ] Thanks
  • What program are you using to write and edit your HTML page?
    • [1] reply
    • Why don't you edit your HTML so that instead of this:



      HTML Code:
      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
      
         "http://www.w3.org/TR/html4/strict.dtd">
      
      <html>
      
      
      
      <head>
      
        <title>Goal Achievement with Gordon Bryan! </title>
      
        <META name="description" content="Gordon Bryan's book, described as 'motivational magic' takes you through 21 ideas to transform your life, from goal achievement and self improvement"><META name="keywords" content="goal achievement, goal setting, self improvement, personal development, Gordon Bryan">
      
      </head>
      
      <frameset rows="100%,*" border="0">
      
        <frame src="http://www.gordonbryan.com/transform" frameborder="0" />
      
        <frame frameborder="0" noresize />
      
      </frameset>
      
      
      
      <!-- pageok -->
      
      <!-- 05 -->
      
      <!-- -->
      
      </html>

      Do it like this instead:

      HTML Code:
      
      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
      
         "http://www.w3.org/TR/html4/strict.dtd">
      
      <html>
      
      
      
      <head>
      
        <title>Goal Achievement with Gordon Bryan! </title>
      
        <META name="description" content="Gordon Bryan's book, described as 'motivational magic' takes you through 21 ideas to transform your life, from goal achievement and self improvement"><META name="keywords" content="goal achievement, goal setting, self improvement, personal development, Gordon Bryan">
      
      </head>
      
      <frameset rows="100%,*" border="0">
      
        <frame src="http://www.gordonbryan.com/transform.html" frameborder="0" />
      
        <frame frameborder="0" noresize />
      
      </frameset>
      
      
      
      <!-- pageok -->
      
      <!-- 05 -->
      
      <!-- -->
      
      </html>
      It should work, because when the following url is loaded in a browser, just the code is shown because the server is returning the Content-Type: text/plain header.

      HTML Code:
      http://www.gordonbryan.com/transform
      But the proper Content-Type is returned when you load the following url in your frame and everything looks how its supposed to look:

      HTML Code:
      http://www.gordonbryan.com/transform.html
      • [ 1 ] Thanks
  • The server is handling the file incorrectly.

    It should be rendering HTML as HTML, but it is not. It is rendering the page as Text.

    This is a situation that your web hosting company should address on your behalf.
    • [1] reply
    • Whether or not the server's behavior is seen as incorrect, it is the server's default behavior. Out of the box, Apache serves files with a Content-Type: text/plain header if the file has no extension telling Apache otherwise. It is this text/plain header that results in browsers displaying HTML code rather than the rendered and expected output.

      All the OP needs to do is add the .html suffix to the URL specified as the frame content in his index file OR modify an htaccess file to instruct Apache to do the appropriate rewrites.

      Web servers don't render HTML, web browsers do. But the web server must be configured to let the web browser know how to render the page. If the OP wants the web server to send a Content-Type: text/header, then he should configure an .htaccess file to tell the server to do that, or he can just load a file with a .html suffix in his frame instead of one with no file extension that tells the server nothing about what headers to send.
  • After waving the dead chicken, I got it to display and immediately recognized it from past experience as composed in one of Microsoft's products - which I loathe and despise with a passion.

    First, it's prone to include a LOT of superfluous code, like the nesting of font sizes. 'Course, if you're the 800-pound gorilla in the room or a wannabee like Netscape/Mozilla you can try to defy the accepted standard and make your own rules. Open any HTML created by them in a plain text editor and you'll be dumbfounded at all the cruft!

    Other code problems seem to be more of the "user error" variety:

    Forcing a space after your checked boxes dropped the semi-colon at the end - so it displays as 'nbsp' with no break before the capitalized sentence begins on each one of them.

    In your image tags you didn't include a 'ALT=' text to identify the image - this is mainly your 'bullet.jpeg' and mugshot 'gordonnew.jpg' No big deal, aside from the brownie points Google will reward you with for doing so.

    Similarly with tables, it makes sense to add the "summary=" text - but AFAIK Google does not give or take away any brownie points for that offense. It's just good coding practice, especially if you're using HTML validators.
    • [ 1 ] Thanks
    • [1] reply
    • ok, it's now pointing to a .html page instead of without the .html

      Hopefully that's sorted it?
      • [1] reply

Next Topics on Trending Feed