Web Technology Slip 4

 Q1. Write a java script program to accept a number from user and check whether it is Armstrong number or not.

Answer : 

<!doctype html>
<html>
<head>
<script>
function armstr()
{
var arm=0,a,b,c,d,num;
num=Number(document.getElementById("no_input").value);
multi = document.getElementById('pPrint');

temp=num;
while(temp>0)
{
a=temp%10;
temp=parseInt(temp/10);
arm=arm+a*a*a;
}
if(arm==num)
{
    multi.innerHTML += (num+" Armstrong number"+ "<br>");
}
else
{
    multi.innerHTML += (num+" Not Armstrong number"+ "<br>");
}
}
</script>
</head>
<body>
    <form>
        <fieldset>
           <legend>JavaScript Program</legend>    
           <table border="3" bgcolor="black" style="color: aliceblue;">
<tr>
<td style="padding:20 20 20 20">
<p>Q. Write a java script program to accept a number from user and check whether it is Armstrong
    number or not. </p>
Enter any Number: <input id="no_input">
<input type="button" value="Click" onclick="armstr()">
<button type="reset" value="Reset">Reset</button>
<p id="pPrint"></p>
</td>
</tr>
</table>
</form>
</fieldset>
</body>
</html>


 Q.2 Create HTML web page with following specifications i) Title should be about your College. ii) Put image in the background iii) Place your college name at the top of page in large text followed by address in smaller size. iv) Add names of courses offered, each in different color, style and font v) Add scrolling text about college. vi) Add any image at the bottom. (use External CSS to format the webpage) 


Q.2 Create HTML web page with following specifications i) Title should be about your College. ii) Put image in the background iii) Place your college name at the top of page in large text followed by address in smaller size. iv) Add names of courses offered, each in different color, style and font v) Add scrolling text about college. vi) Add any image at the bottom. (use External CSS to format the webpage)



Answer : 

<html>
<title>College</title>
<body>
<link rel="stylesheet" type="text/css" href="style1.css">
<div id="container">
<div id="header">
<h1>Enter Your College Name</h1>
</div>
<marquee><p>New admission open for all faculties  1) BCA  2) BBA (CA)  3) BCS 4) B.com</p></marquee>

<div class="container">
<div id="nav">
<ul type="disk">
<li><a href="bca.html" target="fact">BCA</a></li>
<li><a href="bba.html" target="fact">BBA (CA)</a></li>
<li><a href="bcs.html"  target="fact">BCS</a></li>
<li><a href="bcom.html" target="fact">B.Com</a></li>
</ul>
</div>

<div id="main">
<section>
<img src="jkkk.gif">
<article>
<h2>Home Page</h2>
<p> Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of a document written in a markup language like HTML. CSS is a cornerstone technology of the World Wide Web, alongside HTML and JavaScript.CSS is designed to enable the separation of presentation and content, including layout, colors, and fonts. This separation can improve content accessibility, provide more flexibility and control in the specification of presentation characteristics, enable multiple web pages to share formatting by specifying the relevant CSS in a separate .css file, and reduce complexity and repetition in the structural content. </p>
<p>Separation of formatting and content also makes it feasible to present the same markup page in different styles for different rendering methods, such as on-screen, in print, by voice (via speech-based browser or screen reader), and on Braille-based tactile devices. CSS also has rules for alternate formatting if the content is accessed on a mobile device</p>
<p>The CSS specifications are maintained by the World Wide Web Consortium (W3C). Internet media type (MIME type) text/css is registered for use with CSS by RFC 2318 (March 1998). The W3C operates a free CSS validation service for CSS documents.
In addition to HTML, other markup languages support the use of CSS including XHTML, plain XML, SVG, and XUL. 
CSS has a simple syntax and uses a number of English keywords to specify the names of various style properties.
A style sheet consists of a list of rules. Each rule or rule-set consists of one or more selectors, and a declaration block.</p>

<p>The name cascading comes from the specified priority scheme to determine which style rule applies if more than one rule matches a particular element. This cascading priority scheme is predictable. </p>

</article>
</section>
</div>

<div id="footer">copyright@2020 Design By Enter Your Name</div>
</div>
</div>
</body>
</html>


Web Technology Slip 4 Web Technology  Slip 4 Reviewed by technical_saurabh on December 21, 2020 Rating: 5

No comments:

Powered by Blogger.