Model Question Paper -1 Download
Model Question Paper -2 Download
There are three ways to use CSS:
1) External style sheet
2) Internal style sheet
3) Inline style
<html> <body> <h1 style="color:blue;margin-left:30px;">This is a heading.</h1> </body> </html>
<html> <head> <style> body { background-color: pink; } h1 { color: red ; margin-left: 40px; } </style> </head> <body> <h1> Welcome to java script </h1> </body> </html>
mystyle.css body { background-color: lightblue; } h1 { color: yellow; margin-left: 20px; } Mypage.html <html> <head> <link rel="stylesheet" type="text/css" href="mystyle.css"> </head> <body> <h1> Welcome to the world of JAVA SCRIPT </h1> </body> <html>
Myscript.js function myFunction() { document.getElementById("demo").innerHTML = "Paragraph changed."; } Mypage.html <html> <body> <script src="myScript.js"></script> <h1>External JavaScript</h1> <p id="demo">A Paragraph.</p> <button type="button" onclick="myFunction()">Click</button> </body> </html>
<html> <head> <title>JavaScript document - onclick() method example</title> <script> document.onclick = fun1; function fun1() { document.body.style.backgroundColor = "red"; } </script> </head> <body> Welcome to my page </body> </html>
<script> //Date function var x=new Date(); document.write(x); document.write("<br>"); document.write(x.getDate()); document.write("<br>"); x.setDate(14); document.write(x.getDate()); document.write("<br>"); document.write("Hours :" +x.getHours()); x.setHours(16); document.write("<br>"); document.write("Hours :" +x.getHours()); document.write("<br>"); document.write("time :" +x.getTime()); //getTime() Returns the number of milliseconds since 1 January 1970 at 00:00:00. document.write("<br>"); x.setTime(100000); document.write("time :" +x.getTime()); </script>
Stop() method stop the execution of current page. So these page will not load until you put comment on window.stop() method.
<html> <script> window.stop(); </script> <body> <table border="5"> <tr> <th>Name</th> <th>Age</th> </tr> <tr> <td>Ram</td> <td>20</td> </tr> <tr> <td>Sita</td> <td>18</td> </tr> </table> </p> </body> </html>