What is the type of this document.I am confused as it has html 4.0 declaration and also contains xml.
Here is the structure of the document:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN">
<html>
<head>
<TITLE>Container</TITLE>
<LINK href="css/xyz.css" type="text/css" rel="stylesheet">
</head>
<frameset >
<FRAMESET rows="97%,28" border="0" frameBorder="0">
<frame name="main" src="ContainerInner.htm">
<FRAME Name="Statusbar" SRC="html/MainStatusbar.htm">
</FRAMESET>
<noframes>
<p>This page requires frames, but your browser does not support them.</p>
</noframes>
</frameset>
</html>
<!-- ContainerInner.htm -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>ContainerInner</title>
</head>
<body>
<IFRAME Name="MainScreen" SRC="html/loading.htm"></IFRAME>
<IFRAME Name="MenuTree" SRC="html/BlankMenu.htm" />
<iframe name="ToolbarScreen1" src="html/FavouriteMenus.htm"></iframe>
<IFRAME name="TaskQueues" src="html\UserInfo.htm"></IFRAME>
</body>
</html>
<!-- html/loading.htm -->
<!-- screen inside IFRAME MainScreen -->
<?xml version="1.0" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">
<HTML>
<HEAD></HEAD>
<BODY> </BODY>
</HTML>
</xsl:template>
</xsl:stylesheet>
I have following questions:
Is it an XHTML document or HTML.
Is it legal to have multiple doctype declarations like above.
Will latest version of modern browsers like chrome support this document as it has frames.
Related
I have the following code. As i understand frames / framesets will not work in HTML5. So, how can i make it work ? if i wanted the same result to work in HTML5, what should i do ?
<!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" xml:lang="en" lang="en">
<head>
Header stuff herer
screen" title="Screen" charset="utf-8" />
</head>
<frameset cols="100%" frameborder="0">
<frameset rows="<?php echo SITE_CONFIG_TOP;?>, *">
<frame src="framedTop.php?url=<?php echo $shortUrlObj->shortUrlUID; ?>" class="framedTopFrame" noresize scrolling="no"/>
<frame src="<?php echo $shortUrlObj->fullUrl;?>" noresize>/
</frameset>
<noframes>
<?php echo t("browser_no_frame");?>
</noframes>
</frameset>
I am working with frames for the first time. Here is
index.html
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<frameset rows="20%,*">
<frame name="top" src="top.html" name="topmenu" />
<frame name="main" src="content.html" name="content" />
<noframes>
<body>
Your browser does not support frames.
</body>
</noframes>
</frameset>
</html>
top.html
<html>
<head></head>
<body>
<div id="container">
<!-- begin navigation -->
<nav id="navigation">
<ul>
<li>Contact</li>
</ul>
</nav>
<!-- end navigation -->
</div>
</body>
</html>
content.html
<html>
<head></head>
<body>
Some Content
</body>
<html>
contact.html
<html>
<head></head>
<body>
Contact page
</body>
<html>
With this, the output is as under
Now when I click on the Contact link, instead of displaying the content in the content.html, it opens in a new tab as under
What is the mistake I am making. I believe there is some problem from my side in choosing the proper target.
Frames are not supported in HTML5 ^, it is deprecated, and to get it working the <!DOCTYPE> must be set to either HTML Frameset DTD or XHTML Frameset DTD.
If you check the HTML setting in this jsFiddle you'll see that I had set the DOCTYPE to "HTML 4.01 Frameset" in order to make it works, as in this image:
** Also Note that you have used the name attribute twice in each frame tag and there should be only one!
<frame name="top" src="top.html" name="topmenu" />
<frame name="main" src="content.html" name="content" />
^ Sources:
https://developer.mozilla.org/en/docs/Web/HTML/Element/frame
http://www.w3schools.com/tags/tag_frame.asp
I need 3 pages merged in one single page with frame tag so I used a frametag with the src attribute but its not working, is frame tag now obsolete or is it just me?
Here's the code
<html>
<style ="text/css"> </style>
<frameset cols="33.3%,33.3%,33.3%">
<frame src="1.html">
<p>hello</p>
<frame>
<p>productivity</p>
</frame>
<frame>
<p> Entertainment</p>
</frameset>
All the frame pages should follow these mandatory rules:
Page containing <frameset> should not include <html> and/or <body> tags.
The <frame> tags must be close using either <frame></frame> or <frame />.
The <frame> tags must have an 'src' attribute and without src attribute, the space allocated for it will be displayed as a blank page.
For your need the following will be the required answer:
Frame.html
<frameset cols="33.3%,33.3%,33.3%">
<frame src="1.html" />
<frame src="2.html" />
<frame src="3.html" />
</frameset>
1.html
<html>
<body>
<p>Hello</p>
</body>
</html>
2.html
<html>
<body>
<p>Productivity</p>
</body>
</html>
3.html
<html>
<body>
<p>Entertainment</p>
</body>
</html>
I am learning HTML and was creating frames which is not working for me. not sure why, below is my code, Please suggest on reason why it is not working. Browser renders me a blank page.
HTML :
<!DOCTYPE html>
<html>
<head>
<title>
Frames
</title>
</head>
<body>
<frameset cols="25%,75%">
<frame src="Links.html" name="links"/>
<frame src="Main.html" name="content"/>
</frameset>
</body>
</html>
Links HTML
<!DOCTYPE html>
<html>
<head>
<title>
Links
</title>
</head>
<body>
<h3>Links</h3>
<ul style="link-style-type:square">
<li> Home</li>
<li> Contact us</li>
</ul>
<h3>Search</h3>
<ul style="link-style-type:square">
<li> Google.com</li>
</ul>
</body>
</html>
Main.HTML
<!DOCTYPE html>
<html>
<head>
<title>
Main
</title>
</head>
<body>
<h3 align="center">Welcome to Foddies</h3>
<p>
-: About us :-
Established in 2015. We are a leading food chain spread in 23 countries with all type of cusines :)
</body>
</html>
This is because frameset must not be inside body tags.
see this w3 recommendation.
change your code to this:
<!DOCTYPE html>
<html>
<head>
<title>
Frames
</title>
</head>
<frameset cols="25%,75%">
<frame src="Links.html" name="links"/>
<frame src="Main.html" name="content"/>
</frameset>
</html>
Also as suggested here, frame is now deprecated.
The frame tag is depricated and the functionality is removed from most browsers.
Edit: I would suggest using an iframe instead.
To use frames on a page use <frameset> tag only instead of <body>
tag.
Also Frames are deprecated in HTML, I would rather suggest go for iFrame tags.
If we use frameset doctype, can we use normal html tags outside of the frameset tag within that page?
Below is the code;
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html:html locale="true">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<frameset cols="*" rows="40,*">
<frame src="#" />
<frame src="#"/>
<noframes>
<body>
Please enable frames to view.
</body>
</noframes>
</frameset>
Is this Normal Anchor Tag allowed for frameset doctype and if yes, is this the correct position ?
</html:html>
No, you can't put any content outside the frameset, and that has nothing to do with the doctype.
You can only put content inside the body tag, and a frameset page has no body tag (except inside the noframes tag).