HTML Programs: 1. Program To Print The Colors
HTML Programs: 1. Program To Print The Colors
<html>
<body>
<h1 style="background-color:Tomato;">Tomato</h1>
<h1 style="background-color:Orange;">Orange</h1>
<h1 style="background-color:DodgerBlue;">DodgerBlue</h1>
<h1 style="background-color:MediumSeaGreen;">MediumSeaGreen</h1>
<h1 style="background-color:Gray;">Gray</h1>
<h1 style="background-color:SlateBlue;">SlateBlue</h1>
<h1 style="background-color:Violet;">Violet</h1>
<h1 style="background-color:LightGray;">LightGray</h1>
</body>
</html>
<html>
<body>
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>
</body>
</html>
3.Program To display alignment of headings
<html>
<body>
</body>
</html>
<html>
<body>
<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
<ol>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
</body>
</html>
5. Program To display a table
<html>
<title>TABLE</title>
<body>
<div class="w3-container">
<h2>Basic Table</h2>
<p>The w3-table class defines a basic table:</p>
<table BORDER=1>
<tr>
<th>First Name</th>
<th>Last Name</th>
<th>Points</th>
</tr>
<tr>
<td>Jill</td>
<td>Smith</td>
<td>50</td>
</tr>
<tr>
<td>Eve</td>
<td>Jackson</td>
<td>94</td>
</tr>
<tr>
<td>Adam</td>
<td>Johnson</td>
<td>67</td>
</tr>
</table>
</div>
</body>
</html>
6. Program To display the level of items
<html>
<head>
<title>LEVELS OF ITEMS</title>
</head>
<body>
<ol type="=1">
<li> Top level of item</li>
<br />
<li>Another top level of item</li>
<li type="A" value="1">
<p align="center">
Second level of item
</p>
</li>
<li type="A">
<p align="center">
Second level of item
</p>
</li>
<li type="1" value="1">
<p align="right">
Third level item
</p></li>
<li type="A" value="3">
<p align="center">
Another Second level of item
</p>
</li>
<li type="1" value="3"> Another top level item
</li>
</ol>
</body>
</html>
7. Program To implement the frame
<html>
<frameset cols="25%,*,25%">
<frame src="frame_a.htm">
<frame src="frame_b.htm">
<frame src="frame_c.htm">
</frameset>
</html>
frame_a.htm
<html>
<body style="background-color:#8F8FBD">
<h3>Frame A</h3>
<p><strong>Note:</strong> The frameset, frame, and noframes elements are not supported in
HTML5.</p>
</body>
</html>
frame_b.htm
<html>
<body style="background-color:#EBC79E">
<h3>Frame B</h3>
</body>
</html>
frame_c.htm
<html>
<body style="background-color:#FFFFCC">
<h3>Frame C</h3>
</body>
</html>
<html>
<p>Smiley face</p>
</body>
</html>
9. Program To display cascading style sheet
<html>
<head>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
styles.css
<html>
<head>
<style>
body {background-color: powderblue;}
h1 {color: blue;}
p {color: red;}
</style>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
<html>
<head>
</head>
<body bgcolor=black>
<center>
</video>
</body>
</html>
<html>
<head>
<title>HTML Table</title>
</head>
<body>
<caption>Registration form</caption>
<tr>
</tr>
<tr>
<td><input type="text"/></td>
</tr>
<tr>
<td><input type="password"/></td>
</tr>
<tr>
<td><input type="password"/></td>
</tr>
<tr>
<th>Enter your email</th>
<td><input type="email"/></td>
</tr>
<tr>
<td><input type="number"/></td>
</tr>
<tr>
</tr>
<tr>
<td>
</td>
</tr>
<tr>
<td>
</td>
</tr>
<tr>
</tr>
<tr>
<td>
<select name="country">
<option value="1">India</option>
<option value="2">Pakistan</option>
</select>
</td>
</tr>
<tr>
<td><input type="file"/></td>
</tr>
<tr>
</td>
</tr>
</table>
</form>
</body>
</html>
<html>
<head><title>web page</title></HEAD>
<Body style="background-color:thistle">
ALIGN="LEFT"/>
<th><A HREF="HOME.HTML">HOME</A></th>
<th><A HREF="DEPARTMENT.HTML">DEPARTMENT</A></TH>
<TH><A HREF="SPORTS.HTML">SPORTS</A></th>
<th><A HREF="COURSES.HTml">COURSES</A></th></body></head>
</html>
JAVASCRIPT PROGRAMS
<body>
<p id="demo"></p>
<script>
function myFunction() {
if (person != null) {
document.getElementById("demo").innerHTML =
</script>
</body>
</html>
document.write("Addition of " + a +' and ' + b +" is = " + addition + "<br />");
document.write("Subtraction of " + a +' and ' + b +" is = " + subtraction + "<br />");
document.write("Multiplication of " + a +' and ' + b +" is = " + multiplication + "<br
/>");
document.write("Division of " + a +' and ' + b +" is = " + division + "<br />");
document.write("Modulus of " + a +' and ' + b +" is = " + modulus + "<br />");
</script>
</body>
</html>
<html>
<head>
<title>JavaScript to find Odd or Even number Example - Tutorialsmade.com!</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script>
function findOddEven(){
//get the input value
var num = document.getElementById('num').value;
<html>
<body>
<p>Write Banana, Orange or Apple in the input field and click the button.</p>
<p>The switch statement will execute a block of code based on your input.</p>
<p id="demo"></p>
<script>
function myFunction() {
var text;
switch(fruits) {
case "Banana":
break;
case "Orange":
break;
case "Apple":
break;
default:
document.getElementById("demo").innerHTML = text;
</script>
</body>
</html>
<html>
<body>
<p id="demo"></p>
<script>
var i = 0;
do {
if(i%2 == 0)
text += "<br>The number is " + i;
i++;
document.getElementById("demo").innerHTML = text;
</script>
</body>
</html>
PERL PROGRAMS
#!/usr/local/bin/perl
$a = 10;
while( $a < 20 ) {
$a = $a + 1;
#!/usr/local/bin/perl
@list = (2, 20, 30, 40, 50);
foreach $a (@list) {
use strict;
use warnings;
use 5.010;
my $file = shift;
#!/usr/bin/perl
@var_10 = (1..10);
@var_20 = (10..20);
@var_abc = (a..z);
#!/usr/bin/perl -w
#!/usr/bin/perl
@nums = (1,2,3,4,5);
#!/usr/local/bin/perl
$datestring = localtime();