0

Here is the code that I used for a page:

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Frameset//EN”
“http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd”>

<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
        <title>This page illustrates frame sets</title>
        </head>
        <body>
            <frameset rows="30%,*,20%">
                <frame name="one" src="styledform.html" />
                <frame name="two" src="index.html" />
                <frame name="three" src="form.html" />
            </frameset>
        </body>
</html>

The html files styledform.html, index.html and form.html are all present in the same folder as the file whose source code I have displayed above.

When I try to open the above link in Google Chrome browser, I see a blank page. What is the error?

giorgio
  • 10,111
  • 2
  • 28
  • 41
user3760100
  • 679
  • 1
  • 9
  • 20
  • 1
    Your double quotes in your DOCTYPE line seem to invalid – Lee Jan 07 '15 at 10:11
  • You probably found a really old tutorial somewhere, or you are just oldschool ;) Anyway, I would really advise you to _not_ use framesets. There are numerous other ways to separate blocks of content, amongst others including parts with a scripting language, or loading content using AJAX. Framesets are obsolete in the current html specifications, and will never ever return. – giorgio Jan 07 '15 at 10:24

2 Answers2

1

You have a number of errors in your document that a validator would identify for you.

The one that is causing the problem you are asking about is that a frameset document must have a <frameset> element instead of a <body> element and not inside one.

When the browser encounters the <body> start tag, it generates a regular HTML document and then discards the <frameset> as invalid.

That said, don't use frames. There are better alternatives.

Community
  • 1
  • 1
Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335
0

Try change your doctype. There are correct definitions

  • HTML 4.01 Frameset

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
    
  • XHTML 1.0 Frameset

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
    
Mardzis
  • 760
  • 1
  • 8
  • 21