Frames formed by other HTMs are not appearing

0

In my first exercise in HTML frames, I created a document consisting of two frames in which each one is another HTML document, which is in the same folder as the initial document. The HTML of the frames work individually, but when placed in frames and executed, nothing happens. Here is 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>
    
asked by anonymous 04.03.2018 / 14:52

1 answer

5

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

<!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 completely obsolete, and should not be   used by authors:

     

[...]

     
  • frame
  •   
  • frameset
  •   
  • noframes

         

    Either use iframe and CSS instead, or use server-side to include complete pages with the various invariant parts merged in.

  •   
    
04.03.2018 / 17:01