0% found this document useful (0 votes)
138 views6 pages

Name of Student: Ashish Vishal SAPID:1000009234: Assignment

The document provides instructions for an assignment submission. It includes the assignment title, submission mode, assessment method, weightage, release date, and due date. It also lists submission instructions such as the submission deadline, penalties for late submission, plagiarism policy, and file naming conventions. The assignment asks students to design an HTML resume, write CSS style rules, and design an HTML form with JavaScript validation and calculations.

Uploaded by

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

Name of Student: Ashish Vishal SAPID:1000009234: Assignment

The document provides instructions for an assignment submission. It includes the assignment title, submission mode, assessment method, weightage, release date, and due date. It also lists submission instructions such as the submission deadline, penalties for late submission, plagiarism policy, and file naming conventions. The assignment asks students to design an HTML resume, write CSS style rules, and design an HTML form with JavaScript validation and calculations.

Uploaded by

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

Assignment

Name of Student: Ashish Vishal


SAPID:1000009234

Assignment ID Submission
(as per the Deadline
policy Assignment Submission Assessment Group/ Date of (Date and
guidelines) Title Mode Method Individual Weightage Release time)
A1_CS345_Eve Assignment- Explanation
n2020 1 Online +Code Individual 5 10-2-2020 17-02-2020

Instructions (Sample provided below, please change as necessary):

 Assignment must be submitted by the Due Date and Time as mentioned above.
 Assignment submitted after Due Date and Time and before the next 48 hours
will be marked late and will attract a penalty of X marks (out of the overall Y
marks, and it will be evaluated out of Y-X marks only). Assignment will not be
considered for evaluation subsequently (after 48 hours past due date and time),
and a score of zero will be awarded.
 Plagiarism is not allowed by the University for any Academic Document to be
submitted by the students for any assessment. In order to avoid plagiarism
ensure you always follow good academic practice. This include self- plagiarism
i.e. submitting a peace of your own work which has provisionally been presented
for examination.
 Submitted assignment must have your Full Name and SAP ID in the space
provided above this page in the Header.

Submitting this Assignment

 You will submit (upload) this assignment in Moodle.


 Email/paper submissions will not be accepted (except for UG students who are
not yet registered in Moodle).
 Questions must be answered in the given order.
 Submit a pdf version of this document.
 Name this document as A1_CSD207_Even2020_John_Doe.pdf in case your name
is John Doe, and you are submitting Assignment 1 of the course whose code is
CSD207, and it is offered in the Even Semester of the Year 2020.
Name of Student: Name SAPID:Sap_id

1. Design your Resume in HTML as per the template attached. The HTML page must
conform to the layout given in template and substitute the values in the field marked
with <field_name> or XXXX or *****. Write the HTML code as part of the answer of this
question and attach you resume (in HTML page) with this assignment.

Ans:-

2. Consider following two CSS rules-


background-color:silver;
font-size:larger;
These are referred to as “the background declaration” and “the text declaration”
respectively.
a) Write CSS style rules that apply the background declaration to div elements and
the text declaration to strong elements.

<style>
div{
background-color:silver;
}
strong{
font-size:larger;
}
</style>
Name of Student: Ashish Vishal SAPID:1000009234

b) Write a single style rule that applies both the background and text declarations
to both p and em elements.

<style>
p,em{
font-size:larger;
background-color:silver;
}
</style>
c) Write a single style rule that applied the background declaration to HTML
elements having a value of Nevada for their id attributes as well as to elements
belonging to shiny class.

<style>
#Nevada.shiny{
background-color:silver;
font-size:larger;
}
</style>

d) Write a style rule that applies the text declaration to span elements that belong
to the bigger class.

<style>
span.bigger{
font-size:larger;
}
</style>

e) Write a style rule that applies the text declaration to span elements that are
descendants of other span elements.

<style>
span span{
font-size:larger;
}
Name of Student: Ashish Vishal SAPID:1000009234

</style>

f) Write a style rule that applies the background declaration when cursor hovers
over a hyperlink.

<style>
a:hover{
background-color:silver;
}
</style>

3. Design following HTML form


Name of Student: Ashish Vishal SAPID:1000009234

Now, write JavaScript code for following:-


a) Write a JavaScript function and indicate the changes in the form such that only
digits and “.” are allowed when entering “first”, “second” and “third” and when
the value is correct the corresponding checkbox is selected.
b) Write a JavaScript function and indicate the changes in the form such that when
a checkbox is unselected the corresponding value is reset to 0.
c) Adjust your JavaScript code such that the sub-total, the tax and the total are
calculated whenever a value is changed.
Ans:-

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
</head>
<body>
<form>
<label for='first'>First : </label>
<input type="text" name="" id='first' value="" placeholder=""><input id='1' type="checkbox"
name="" value="" placeholder=""><br>
<label for='second'>Second : </label>
<input type="text" name="" id='second' value="" placeholder=""><input id='2' type="checkbox"
name="" value="" placeholder=""><br>
<label for='third'>third : </label>
<input type="text" name="" id='third' value="" placeholder=""><input id='3' type="checkbox"
name="" value="" placeholder=""><br>
<hr>
<label for=''>Subtotal : $</label>
<input type='text' id='sbt' name="">
<hr>
<label for=''>Tax 7% : $</label>
<input type='text' id='tax' name="">
<label for=''>Total : $</label>
Name of Student: Ashish Vishal SAPID: 1000009234

<input type='text' id='total' name="">


<hr>
<button id='demo1' type="">Submit query</button>
<button id='demo2' type="reset">Reset</button>
<hr>
</form>
</body>
<script>
var tb1,tb2,tb3;
function assign(){
tb1=Number(document.getElementById('first').value);
if (isNaN(tb1)==false && tb1!=0)
{ document.getElementById('1').checked=true; }
else{ document.getElementById('1').checked=
false;
}
tb2=Number(document.getElementById('second').value);
if (isNaN(tb2)==false && tb2!=0)
{ document.getElementById('2').checked=true; }
else{ document.getElementById('2').checked=
false;
}
tb3=Number(document.getElementById('third').value);
if (isNaN(tb3)==false && tb3!=0)
{ document.getElementById('3').checked=true; }
else{ document.getElementById('3').checked=
false;
}
}
function total(){
var st=tb1+tb2+tb3;
var tax=(7*st)/100;
var total=st+tax;
document.getElementById('sbt').value=st;
document.getElementById('tax').value=tax;

You might also like