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).
Related
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 am experiencing quiet an unusual issue with salesforce when I put it in a html frame, when I click on the login button link, it is not loading the login page. but every other link is working perfectly fine, as soon as I take it out of the html frame it works, is there something that can be done to fix this issue by any chance? I have looked and been unsuccessful.
So i got 2 .html files 1 named Script, which is just plain simple text to be displayed in the left frame, and the main frame is the salesforce link.
Then the third html file is the frame file which links both html files to load into one.
The code for all this is below, please let me know if you are successful, Thanks.
script.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="refresh" content="60; url=script.html" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Script</title>
<style type="text/css">
<!--
.style1 {font-family: Arial, Helvetica, sans-serif}
-->
</style>
</head>
<body>
<p> hello how are you </p>
</body>
</html>
salesForce.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="refresh" content="0; url=http://www.salesforce.com/au/" />
<title>Sales Force</title>
</head>
<body>
</body>
</html>
salesForceScript.html
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Sales Force & Script</title>
</head>
<frameset rows="*" cols="277*,973*" framespacing="0" frameborder="no" border="0">
<frame src="script.html" name="leftFrame" id="leftFrame" title="leftFrame" />
<frame src="salesForce.html" name="mainFrame" id="mainFrame" title="mainFrame" />
</frameset>
<noframes>
<body>
</body>
</noframes>
</html>
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.
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.
I am a beginner in html. I have a web page containing an iframe tag.
If the tag is closed like
<iframe src="http://mysite.com/l/5042/2012-06-21/9pb4y" width="100%" height="500" frameborder="0" style="border: 0" />
the html content following iframe tag are not displayed.
But if the tag is closed like
<iframe src="http://mysite.com/l/5042/2012-06-21/9pb4y" width="100%" height="500" frameborder="0" style="border: 0" > </iframe>
everything works fine.
Don't know why I am having this weird issue.
Copy this code to the W3C markup validation service:
<!-- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> //-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
<title></title>
</head>
<body>
<iframe src="http://mysite.com/l/5042//2012-06-21/9pb4y" width="100%" height="500" frameborder="0" style="border: 0" ></iframe>
<iframe src="http://mysite.com/l/5042//2012-06-21/9pb4y" width="100%" height="500" frameborder="0" style="border: 0" />
</body>
</html>
Comment and uncomment as appropriate to test the two different DOCTYPEs.
You will see that the iframe tag is not supported with your DOCTYPE. Either change the DOCTYPE or don't use iframes. (Of course, you can use the iframe tag that is explicitly closed, but since that does not validate, I would say that is a risky option if you want to work in as many browsers as possible.)
I don't mean to imply that iframe is deprecated. See this unchallenged posting on the W3C site
A iframe is tagged like the one that works in your example
<iframe src=... attributes=...></iframe>
But in your example is a space between open and close tag, just remove that.