开发者

Problem with HTML frameset and frame

开发者 https://www.devze.com 2023-03-24 10:33 出处:网络
I am using the below HTML file. The page displays nothing and my text editor is highlighting the frameset tags in yellow color showing it is an error (or warning). What is wrong with this code?

I am using the below HTML file. The page displays nothing and my text editor is highlighting the frameset tags in yellow color showing it is an error (or warning). What is wrong with this code?

<html>
    <head></head>
    <body>
        <开发者_如何学JAVAframeset>
            <frame src="http://google.com/" scrolling="yes">
        </frameset>
    </body>
</html>


Remove the <body> tag. Also the closing tag </body>

<html>
    <head></head>

        <frameset>
            <frame src="http://google.com/" scrolling="yes">
        </frameset>

</html>


I believe needs a width attribute:

<frameset cols="*">


Remove body and add a cols or rows attribute to the frameset. Also, reference the Frameset DTD, which will give you the rules for using frames.


<html>
    <head></head>
    <body>
        <iframe src="http://google.com/" scrolling="yes"/>
    </body>
</html>
0

精彩评论

暂无评论...
验证码 换一张
取 消