Frames formed by other htmls are not appearing

Asked

Viewed 38 times

0

In my first HTML frame exercise, I created a document made up of two frames where each one is another HTML document, which is in the same folder as the initial document. The HTML of frames work individually, but when you put them in frames and run, nothing happens. Follow the code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
"http://www.w3.org/TR/REC-html40/strict.dtd">
<HTML>
<HEAD> 
<TITLE>Aprendendo Frames</TITLE>
</HEAD>
<BODY>
<frameset rows="50%, 50%">
    <frame src="primeirohtml.htm" name="Parte superior">
    <frame src="SegundoHtml.htm" name="Parte inferior">
</frameset>
</BODY>
</HTML>
  • 2

    Are you learning something obsolete that you don’t use anymore? I don’t think it’s worth it.

  • Actually dvd, this is the first class, I think just to learn the basic commands. In the third we will start to see html 5.

1 answer

5


Unlike a common HTML page, a Frameset has a tag frameset in place of tag body:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
"http://www.w3.org/TR/REC-html40/strict.dtd">
<HTML>
<HEAD> 
<TITLE>Aprendendo Frames</TITLE>
</HEAD>
<frameset rows="50%, 50%">
    <frame src="primeirohtml.htm" name="Parte superior">
    <frame src="SegundoHtml.htm" name="Parte inferior">
</frameset>
</HTML>

it is also interesting to define the appropriate document type, for example:

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

It is important to note that since HTML5 frame, frameset and noframes have become obsolete:

Elements in the following list are entirely obsolete, and must not be used by Authors:

[...]

  • frame
  • Frameset
  • noframes

    Either use iframe and CSS Instead, or use server-side includes to generate complete pages with the Various invariant Parts merged in.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.