How Do I Check How My Webpage Displays?

36 replies
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
#check #displays #webpage
  • Profile picture of the author allenjohn
    View through another browser i.e. IE or FF.... regards Allen

    PS To fix, you probably need to share URL so people can assess....
    Signature

    Make Money with Niche Blogs Auto Profit - Let us build YOUR auto blogging empire for you. BUY BACK GUARANTEE for Gold Orders! FAQ - NEW! - One Way Link Building Service

    {{ DiscussionBoard.errors[4008508].message }}
  • {{ DiscussionBoard.errors[4008907].message }}
    • Profile picture of the author rosetrees
      Interesting.

      In Chrome - I just see HTML

      In IE, of course, I see your web page
      {{ DiscussionBoard.errors[4008915].message }}
  • Profile picture of the author TilenHrovatic
    I use FireFox and there's just HTML...
    {{ DiscussionBoard.errors[4008955].message }}
  • Profile picture of the author sbucciarel
    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.
    {{ DiscussionBoard.errors[4008961].message }}
  • Profile picture of the author UMS
    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?
    {{ DiscussionBoard.errors[4008969].message }}
  • Profile picture of the author Mike Baker
    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">
    Signature

    {{ DiscussionBoard.errors[4008970].message }}
  • Profile picture of the author Mike Baker
    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).
    Signature

    {{ DiscussionBoard.errors[4009209].message }}
    • Profile picture of the author sbucciarel
      Banned
      Originally Posted by Mike Baker View Post

      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).
      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
      {{ DiscussionBoard.errors[4009221].message }}
      • Profile picture of the author Mike Baker
        Originally Posted by sbucciarel View Post

        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
        No but the slight change will make it compatible with all browsers.
        Signature

        {{ DiscussionBoard.errors[4009233].message }}
  • Profile picture of the author Mike Baker
    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.
    Signature

    {{ DiscussionBoard.errors[4009215].message }}
    • Profile picture of the author The Great Gordino
      Originally Posted by Mike Baker View Post

      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.
      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.
      Signature
      {{ DiscussionBoard.errors[4009245].message }}
  • Profile picture of the author Mike Baker
    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?
    Signature

    {{ DiscussionBoard.errors[4009308].message }}
    • Profile picture of the author The Great Gordino
      Originally Posted by Mike Baker View Post

      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?
      Thanks Mike - so should all elements following the = sign have " " around whatever the variable is?


      I edit content in notepad.
      Cheers,
      Gordon
      Signature
      {{ DiscussionBoard.errors[4014912].message }}
      • Profile picture of the author Mike Baker
        Originally Posted by The Great Gordino View Post

        Thanks Mike - so should all elements following the = sign have " " around whatever the variable is?


        I edit content in notepad.
        Cheers,
        Gordon
        Yes, all values need to be in inside the parenthesis. Have a read of this basics guide.
        Signature

        {{ DiscussionBoard.errors[4014949].message }}
        • Profile picture of the author sbucciarel
          Banned
          Originally Posted by Mike Baker View Post

          Yes, all values need to be in inside the parenthesis. Have a read of this basics guide.

          His code is sloppy but that is not the problem. He can spend hours fixing things that won't make a difference or he can tackle the problem and get it fixed. The sloppy code renders fine on Hostgator, as does sloppy code all over the Internet. I think there's a server issue and he should just contact his hosting support.
          {{ DiscussionBoard.errors[4014969].message }}
          • Profile picture of the author The Great Gordino
            Right then, off to see how far I get with hosting support.

            Thanks so much to all that helped, I love it when people offer detailed help with no agenda just because it was asked!
            It's a great feature of the forum, and appreciated!

            Cheers,
            Gordon
            Signature
            {{ DiscussionBoard.errors[4015014].message }}
  • Profile picture of the author sbucciarel
    Banned
    Still not fixed. You should contact your host for support. The page displayed on my server and not on yours in Firefox.
    {{ DiscussionBoard.errors[4014946].message }}
  • Profile picture of the author Ask Michael Paul
    What program are you using to write and edit your HTML page?
    Signature
    To OUR Success,
    Michael Paul
    Skype: mhponline
    AutoXTen - Pre-Launch NOW!
    {{ DiscussionBoard.errors[4015059].message }}
    • Profile picture of the author mojojuju
      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
      Signature

      :)

      {{ DiscussionBoard.errors[4015380].message }}
  • Profile picture of the author tpw
    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.
    Signature
    Bill Platt, Oklahoma USA, PlattPublishing.com
    Publish Coloring Books for Profit (WSOTD 7-30-2015)
    {{ DiscussionBoard.errors[4015568].message }}
    • Profile picture of the author mojojuju
      Originally Posted by tpw View Post

      The server is handling the file incorrectly.
      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.



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

      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.
      Signature

      :)

      {{ DiscussionBoard.errors[4015624].message }}
  • Profile picture of the author Henry White
    Originally Posted by The Great Gordino View Post

    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
    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.
    {{ DiscussionBoard.errors[4016058].message }}
    • Profile picture of the author The Great Gordino
      ok, it's now pointing to a .html page instead of without the .html

      Hopefully that's sorted it?
      Signature
      {{ DiscussionBoard.errors[4020511].message }}
      • Profile picture of the author sbucciarel
        Banned
        Originally Posted by The Great Gordino View Post

        ok, it's now pointing to a .html page instead of without the .html

        Hopefully that's sorted it?
        lol .... was that the problem? no .html extension on the index file? I actually thought of that and then thought nooooo ... it wouldn't be that.
        {{ DiscussionBoard.errors[4020572].message }}
        • Profile picture of the author The Great Gordino
          Originally Posted by sbucciarel View Post

          lol .... was that the problem? no .html extension on the index file? I actually thought of that and then thought nooooo ... it wouldn't be that.
          Ah, er, feeling suitably silly.

          I'm going to put it down in the category of 'if I'm not prepared to look silly, I'll never ask, so will never learn!'

          Still, I got great help and good advice which I can use!

          Thanks all,
          Gordon
          Signature
          {{ DiscussionBoard.errors[4021309].message }}
          • Profile picture of the author sbucciarel
            Banned
            Originally Posted by The Great Gordino View Post

            Ah, er, feeling suitably silly.

            I'm going to put it down in the category of 'if I'm not prepared to look silly, I'll never ask, so will never learn!'

            Still, I got great help and good advice which I can use!

            Thanks all,
            Gordon
            Nothing to feel silly about. Most of us were there once. I should have asked the question instead of assuming. Glad it's all fixed now. Views fine in FF now from here.
            {{ DiscussionBoard.errors[4021374].message }}

Trending Topics