0% found this document useful (0 votes)
20 views9 pages

Assignment 02 (Gopal Ranjan 2022CA033

The document contains code for two HTML pages and JavaScript code to perform arithmetic operations. The first page code defines the structure and styling of the page with headings, paragraphs, lists, a table, image, text formatting tags, preformatted text, and a link. The second page code contains a form with various input fields like text, radio buttons, checkboxes, select dropdown, textarea to book a cab with options to select pickup/dropoff details and extras. The JavaScript code contains arithmetic operations like addition, subtraction, multiplication, division, modulo, increment, decrement on two numbers and concatenates a string to show the output.

Uploaded by

Gopal Ranjan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views9 pages

Assignment 02 (Gopal Ranjan 2022CA033

The document contains code for two HTML pages and JavaScript code to perform arithmetic operations. The first page code defines the structure and styling of the page with headings, paragraphs, lists, a table, image, text formatting tags, preformatted text, and a link. The second page code contains a form with various input fields like text, radio buttons, checkboxes, select dropdown, textarea to book a cab with options to select pickup/dropoff details and extras. The JavaScript code contains arithmetic operations like addition, subtraction, multiplication, division, modulo, increment, decrement on two numbers and concatenates a string to show the output.

Uploaded by

Gopal Ranjan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

ASSIGNMENT 2(XML)

Code for 1st Page-


<!DOCTYPE html>
<html>
<head>
<h1 style: color:"pink" class="a">ASSINGMENT 2</h1>
<style>
h,.a{
text-align: center;
}
</style>

</head>

<body>
<h2 class="a">Paragraph</h2>
<p>As we all know, a paragraph is a group of sentences that are connected
and makes absolute sense. While writing a long essay or letter, we break
them into paragraphs for better understanding, and to make a
well-structured writing piece. Paragraph writing on any topic is not only
about expressing your thoughts on the given topic, but it is also about
framing ideas about the topic and making it convenient for the readers to
follow it. In English paragraph writing, it is essential to focus on the
writing style, i.e., the flow and connection between the sentences.</p>
<h2 class="a">HEADING TAG</h2>
<br>
<h1> Heading1 </h1>
<h2> Heading2 </h2>
<h3> Heading3 </h3>
<h4> Heading4 </h4>
<h5> Heading5 </h5>
<h6> Heading H6 </h6>
<br>
<h2 class="a">Ordered List</h2>
<ol>
<li>element1</li>
<li>element2</li>
<li>element3</li>
</ol>
<h2 class="a">Unordered List</h2>
<ul>
<li>element1</li>
<li>element2</li>
<li>element3</li>
</ul>

<h2class="a">Table</h2>
<table style="width=100%"
border="1"
color="yellow">
<tr>
<th>S.No</th>
<th>Name</th>
<th>Marks</th>
<th>Result</th>
</tr>
<tr>
<td>1</td>
<td>Ramesh</td>
<td>56</td>
<td>Pass</td>
</tr>
<tr>
<td>2</td>
<td>Suresh</td>
<td>96</td>
<td>Pass</td>
</tr>
<tr>
<td>3</td>
<td>Vimlesh</td>
<td>28</td>
<td>Fail</td>
</tr>
</table>

<h2 class="a">Add Image</h2>


<img style size="10x"
src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSrxshC2RFkdDMfs
ytzjL0Ejuc5DspljHaFDw&usqp=CAU">

<h2 class="a">Text Formatters</h2>


<b>This is bold</b><br>
<i>This Is Italics</i><br>
<u>This Is Underline</u><br>
<strike>This Is Strike</strike>

<h2 class="a">Pre Tag</h2>


<pre>
The pre tag defines preformatted text.

Text in a pre tag element is displayed in a fixed-width font, and the text
preserves both spaces and line breaks. The text will be displayed exactly
as written in the HTML source code.
</pre>

<h2 class="a">Link Tag</h2>

<a href="http://127.0.0.1:5500/a.html" target="blank">This is link to


MNNIT Website.</a>

</body>
</html>

Code for 2nd Page-


<h1><centre>Form for Cab booking</centre></h1>
<form method="get" enctype="application/x-www-form-urlencoded"
action="/html/codes/html_form_handler.cfm">

<p>
<label>Name
<input type="text" name="customer_name" required>
</label>
</p>

<p>
<label>Phone
<input type="tel" name="phone_number">
</label>
</p>

<p>
<label>Email
<input type="email" name="email_address">
</label>
</p>

<fieldset>
<legend>Which taxi do you require?</legend>
<p><label> <input type="radio" name="taxi" required value="car"> Car
</label></p>
<p><label> <input type="radio" name="taxi" required value="van"> Van
</label></p>
<p><label> <input type="radio" name="taxi" required value="tuktuk"> Tuk
Tuk </label></p>
</fieldset>

<fieldset>
<legend>Extras</legend>
<p><label> <input type="checkbox" name="extras" value="baby"> Baby Seat
</label></p>
<p><label> <input type="checkbox" name="extras" value="wheelchair">
Wheelchair Access </label></p>
<p><label> <input type="checkbox" name="extras" value="tip"> Stock Tip
</label></p>
</fieldset>

<p>
<label>Pickup Date/Time
<input type="datetime-local" name="pickup_time" required>
</label>
</p>

<p>
<label>Pickup Place
<select id="pickup_place" name="pickup_place">
<option value="" selected="selected">Select One</option>
<option value="office" >Taxi Office</option>
<option value="town_hall" >Town Hall</option>
<option value="telepathy" >We'll Guess!</option>
</select>
</label>
</p>

<p>
<label>Dropoff Place
<input type="text" name="dropoff_place" required list="destinations">
</label>

<datalist id="destinations">
<option value="Airport">
<option value="Beach">
<option value="Fred Flinstone's House">
</datalist>
</p>

<p>
<label>Special Instructions
<textarea name="comments" maxlength="500"></textarea>
</label>
</p>

<br>
<label>Upload Payment Status</label>
<input type="file" id="myFile" name="filename">
<br>

<p><button>Submit Booking</button></p>
<p><button>Reset Booking</button></p>
</form>

Code of arithmetic operation in JavaScript:-

<script>
a = 20
b = 23
c='text'
console.log("additiion : " ,a+b)
console.log("subtraction : ",a-b)
console.log("multiplication : ",a*b)
console.log("division : ",a/b)
console.log("modulo is : ",a%b)
console.log("increament is : ",++a)
console.log("decreament is : ",--a)
console.log("numeric+string : ",a+b+c)
</script>

Screenshot(1st , 2nd Page & java script output) :-

You might also like