Jump to content

W3schools Offline Editor ?


dollar

Recommended Posts

I'm practicing coding but the problem is it's very hard to : open notepad,write code, save with .html , open it in browser...So is there's any W3Schools Offline version or editor like this? : 1091218818mydesktop.png I mean I write the code left side and result should appear in right or something like that..

Link to comment
Share on other sites

No, but you can write your own:

<!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><style type="text/css">textarea, iframe {width:200px;height:200px;}td {vertical-align:top;text-align:center;}</style><script type="text/javascript">function tryit(){	var html = document.getElementById("code").value;	ifrm = document.getElementById("output");	var doc = ifrm.contentDocument || ifrm.contentWindow.document;	doc.open();	doc.write(html);	doc.close();}</script></head><body><table cellspacing="4" cellpadding="0" border="0">  <tr>    <td>      <textarea id="code"><html><body>Hello World!</body></html></textarea>      <br />      <button onclick="tryit();">Do it!</button>    </td>    <td>      <iframe id="output"></iframe>    </td>  </tr></table></body></html>

I only (briefly) tested this in IE6 and Firefox.

Link to comment
Share on other sites

No, but you can write your own:
<!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><style type="text/css">textarea, iframe {width:200px;height:200px;}td {vertical-align:top;text-align:center;}</style><script type="text/javascript">function tryit(){	var html = document.getElementById("code").value;	ifrm = document.getElementById("output");	var doc = ifrm.contentDocument || ifrm.contentWindow.document;	doc.open();	doc.write(html);	doc.close();}</script></head><body><table cellspacing="4" cellpadding="0" border="0">  <tr>    <td>      <textarea id="code"><html><body>Hello World!</body></html></textarea>      <br />      <button onclick="tryit();">Do it!</button>    </td>    <td>      <iframe id="output"></iframe>    </td>  </tr></table></body></html>

I only (briefly) tested this in IE6 and Firefox.

Thanks a ton jesh. One small doubt here : how to change the height and width of right side (result) table(box) ?
Link to comment
Share on other sites

  • 1 month later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...