IT ASSIGNMET
NAME: NABANITA HALDER
ROLL: CSE2017/097
UNIVERSITY ROLL: 11700117092
SUB CODE: CS795A
CSE2017/097 1
NABANITA HALDER
DAY 1:
EXPERIMENT NAME: Web page design using HTML
AIMS: a) Start a web page with an <html> tag
i) Add a heading.
ii) Add a title.
iii) Start the <body> section.
iv) Add the following text using <H1> and </H1> tags: This Webpage was designed by (your
name)
v) Add the following text using <H2> and </H2> tags: My HTML assignment
vi) Add a horizontal line
vii) Insert an image to your web page.
viii) Add another horizontal line.
ix) Enter a paragraph of text.
x) Add a link that takes you to your favourite webpage.
xi) Start a new paragraph. Add a three item ordered list.
xii) Close out your body and html tags
b)Start your web page with an <html> tag
i) Add a heading.
ii) Add a title.
iii) Start the <body> section.
iv) Start a new paragraph using the following:
Use alignment attribute,
Use bold, italic, underline tags,
Use font tag and associated attributes,
Use heading tags,
Use preserve tag,
Use non breaking spaces (escape character).
c)Start your web page with an <html> tag
i) Add a heading.
ii) Add a title.
iii) Start the <body> section.
iv) Start a new paragraph.
v) Create Hyperlinks:
(a) Within the HTML document.
(b) To another URL.
(c) To a file that can be rendered in the browser.
CSE2017/097 2
NABANITA HALDER
THEORY: Hypertext Markup Language (HTML) is the standard markup language for
documents designed to be displayed in a web browser. It can be assisted by technologies
such as Cascading Style Sheets (CSS) and scripting languages such as JavaScript.
Web browsers receive HTML documents from a web server or from local storage and
render the documents into multimedia web pages. HTML describes the structure of a web
page semantically and originally included cues for the appearance of the document.
HTML elements are the building blocks of HTML pages. With HTML constructs, images and
other objects such as interactive forms may be embedded into the rendered page. HTML
provides a means to create structured documents by denoting structural semantics for text
such as headings, paragraphs, lists, links, quotes and other items. HTML elements are
delineated by tags, written using angle brackets. Tags such as <img /> and <input /> directly
introduce content into the page. Other tags such as <p> surround and provide information
about document text and may include other tags as sub-elements. Browsers do not display
the HTML tags, but use them to interpret the content of the page.
CODE (a):
CSE2017/097 3
NABANITA HALDER
OUTPUT (a):
This web page is designed by Nabanita Halder
CSE2017/097 4
NABANITA HALDER
CODE (b):
OUTPUT (b):
CSE2017/097 5
NABANITA HALDER
CODE (c):
OUTPUT (c):
REMARKS:Although a high-end website is what most companies look for nowadays, it is
more expensive in comparison to an HTML based website. The best part about the latter is
that it looks as appealing as the former but provides a viable solution for web designing at
low cost. Therefore, if yours is a start-up business, it would be wise to go for well-built
HTML website than tying out the other options. Apart from saving your time and money, it
would also ease the workload of keeping your website up and running.
CSE2017/097 6
NABANITA HALDER
DAY: 2
EXPERIMENT NAME: Web page design using HTML and designing using CSS
AIMS: a) Start your web page with an <html> tag
i) Add a heading.
ii) Add a title.
iii) Start the <body> section.
Create an unordered list,
Create an ordered list,
Use various bullet styles,
Created nested lists,
Use the font tag in conjunction with lists,
Create definition lists, Use graphics as bullets.
b) Start your web page with an tag
i) Add a heading
ii) Add a title
iii) Start the section. Create a frameset: Use frame tags, Create vertical (column)frames,
Create horizontal (row) frames, Create complex framesets, Use the
hyperlink tag to target displaying an HTML page to another frame.
WEB DESIGNING USING CSS :-
c) Create a web page of your choice and the html elements of the page will bestyled by CSS
THEORY: CSS stands for Cascading Style Sheets
CSS describes how HTML elements are to be displayed on screen, paper, or in other media
CSS saves a lot of work. It can control the layout of multiple web pages all at once
External stylesheets are stored in CSS files
CSS rules are made up of a selector and at least one declaration. A selector is the code that
selects the HTML to which you want to apply the style rule. We'll be focusing on common
selectors in this tutorial, but you can use more than a dozen selector types as you become
more proficient at CSS. A declaration is made up of at least one CSS property and related
property value.
CSE2017/097 7
NABANITA HALDER
CODE (a):
OUTPUT (a):
CSE2017/097 8
NABANITA HALDER
CODE (b):
OUTPUT (b):
CSE2017/097 9
NABANITA HALDER
CODE (c):
OUTPUT (c):
REMARKS:The idea behind(HTML & CSS) it was to seperate presentation and content of a
web site. The advantage of this approach is that updates and changes to the presentation
need only be applied once (to the stylesheet) to affect all pages. Especially large sites can
achieve significant time savings. In order to enforce this separation of concerns, the W3C
has deprecated the <font> tag in HTML 4. Newer (X)HTML versions will deprecate other
tags in a similar vein.
CSE2017/097 10
NABANITA HALDER
DAY: 3
EXPERIMENT NAME: Basics of XML
AIMS: 1. Create an XML document that contains the name and price per pound ofcoffee
beans.
i) In your XML document mention all properties of XML declaration.
ii) The root element has name <coffee_bean>.
iii) Create nested elements for different types of coffee.
iv) Validate the document and if any parsing error is present, fix them.
2. Create a DTD on product catalog.
THEORY: Extensible Markup Language (XML) is a markup language that defines a set of
rules for encoding documents in a format that is both human-readable and machine-
readable. The design goals of XML focus on simplicity, generality, and usability across the
Internet. It is a textual data format with strong support via Unicode for different human
languages. Although the design of XML focuses on documents, the language is widely used
for the representation of arbitrary data structures such as those used in web services.
CODE (1):
OUTPUT (1):
CSE2017/097 11
NABANITA HALDER
CODE (2):
OUTPUT (2):
REMARKS:Differences between XML and HTML
XML and HTML were designed with different goals:
XML is designed to carry data emphasizing on what type of data it is.
HTML is designed to display data emphasizing on how data looks
XML tags are not predefined like HTML tags.
HTML is a markup language whereas XML provides a framework for defining
markuplanguages.
HTML is about displaying data,hence it is static whereas XML is about carrying
information,which makes it dynamic
CSE2017/097 12
NABANITA HALDER
DAY: 4
EXPERIMENT NAME: Basics of Cookies
AIMS: Write a code to get a cookie, set a cookie, and delete a cookie. You must set
thecookie with your name, roll number , year and section. Further, when you revisit
thewebpage, it should greet the user with a message “GOOD
MORNING<NAME><YEAR><ROLL><SECTION>” or “GOOD
EVENING<NAME><YEAR><ROLL><SECTION>”.
THEORY:
An HTTP cookie (also called web cookie, Internet cookie, browser cookie, or simply cookie)
is a small piece of data stored on the user's computer by the web browser while browsing a
website. Cookies were designed to be a reliable mechanism for websites to remember
stateful information (such as items added in the shopping cart in an online store) or to
record the user's browsing activity (including clicking particular buttons, logging in, or
recording which pages were visited in the past). They can also be used to remember pieces
of information that the user previously entered into form fields, such as names, addresses,
passwords, and payment card numbers.
CSE2017/097 13
NABANITA HALDER
CODE:
CSE2017/097 14
NABANITA HALDER
OUTPUT:
Nabanita Halder
CSE2017/097
Nabanita Halder
097
CSE2017/097 15
NABANITA HALDER
REMARKS:
Cookies perform essential functions in the modern web. Perhaps most importantly,
authentication cookies are the most common method used by web servers to know
whether the user is logged in or not, and which account they are logged in with. Without
such a mechanism, the site would not know whether to send a page containing sensitive
information, or require the user to authenticate themselves by logging in. The security of an
authentication cookie generally depends on the security of the issuing website and the
user's web browser, and on whether the cookie data is encrypted. Security vulnerabilities
may allow a cookie's data to be read by a hacker, used to gain access to user data, or used
to gain access (with the user's credentials) to the website to which the cookie belongs (see
cross-site scripting and cross-site request forgery for examples).
CSE2017/097 16
NABANITA HALDER
DAY: 5
EXPERIMENT NAME: Basic PERL programming
AIMS: a)Write a perl script to convert a temperature from Celsius to Fahrenheit
b)Write a perl script to find out whether a number is prime or not
c)Write a Perl script to implement associative array.
d)Write a Perl script to implement the regular expression as follows:
If a string contains any vowel, count the total number of vowels.
If a string starts with MCA and end with bw, print 1 else 0.
If string starts with 0 or any no. a’s, then print 1 else 0.
e) Implement the following with regular expression in Perl:
a*bc
a* at least 2 b’s
a*exactly 3 b’s
THEORY:Perl is an interpreted language, which means that your code can be run as is,
without a compilation stage that creates a non portable executable program.
Traditional compilers convert programs into machine language. When you run a Perl
program, it's first compiled into a byte code, which is then converted ( as the program runs)
into machine instructions. So it is not quite the same as shells, or Tcl, which are strictly
interpreted without an intermediate representation.
It is also not like most versions of C or C++, which are compiled directly into a machine
dependent format. It is somewhere in between, along with Python and awk and Emacs .elc
files.
CODE (a):
OUTPUT (a):
CSE2017/097 17
NABANITA HALDER
CODE (b):
OUTPUT (b):
CODE (c):
OUTPUT (c):
CSE2017/097 18
NABANITA HALDER
CODE (d):
OUTPUT (d):
CODE (e):
OUTPUT (e):
REMARKS: Perl is an interpreted language, which means that your code can be run as is,
without a compilation stage that creates a non portable executable program.
Traditional compilers convert programs into machine language. When you run a Perl
program, it's first compiled into a byte code, which is then converted ( as the program runs)
into machine instructions. So it is not quite the same as shells, or Tcl, which are strictly
interpreted without an intermediate representation.
CSE2017/097 19
NABANITA HALDER
DAY: 6
EXPERIMENT NAME: Advanced PERL programming
AIMS: 1)Write a perl script to implement associative array.
2) Write a perl script to implement the regular expression as follows:
a) If a string contains any vowel, count the total number of vowels.
b) If a string starts with MCA and end with bw, print 1 else 0.
c) If string starts with 0 or any no. a’s, then print 1 else 0.
3)Implement the following with regular expression in Perl:
a) a*bc
b) a* at least 2 b’s
c) a*exactly 3 b’s
4) A simple file operation using Perl.
5)Write a PERL script to search for a number in an array of 10 elements
THEORY: In Perl, array is a special type of variable. The array is used to store the list of
values and each object of the list is termed as an element. Elements can either be a
number, string, or any type of scalar data including another variable.
A regular expression is a string of characters that defines the pattern or patterns you are
viewing. The syntax of regular expressions in Perl is very similar to what you will find within
other regular expression.supporting programs, such as sed, grep, and awk.
The basic method for applying a regular expression is to use the pattern binding operators
=~ and !~. The first operator is a test and assignment operator
CODE (1):
OUTPUT (1):
CSE2017/097 20
NABANITA HALDER
CODE (2a):
"Nabanita Halder"
OUTPUT (2a):
CODE (2b):
OUTPUT (2b):
CODE (2c):
CSE2017/097 21
NABANITA HALDER
OUTPUT (2c):
CODE (3a):
OUTPUT (3a):
CODE (3b):
OUTPUT (3b):
CSE2017/097 22
NABANITA HALDER
CODE (3c):
OUTPUT (3c):
CODE (4):
OUTPUT (4): Displayed contents of file
CODE (5):
CSE2017/097 23
NABANITA HALDER
OUTPUT (5):
REMARKS: Perl excels at working with text. It is an amazing language for processing logs,
data munging, and pretty much anything you want to do from a command line. Even with
its history as being behind the monstrosity of Perl CGI, there are new frameworks like
Dancer for modern webapps.
Perl is still very much a viable choice for modern programming. CPAN (a massive repository
of Perl libraries and modules) is alive and well, and the majority of useful modules continue
to be maintained. Books like Modern Perl give the style to keep Perl modern without falling
victim to the mistakes of the past.
CSE2017/097 24
NABANITA HALDER
DAY: 7
EXPERIMENT NAME: Programming with JavaScript
AIMS: a)Write JavaScript codes to validate your email id without using reg-ex
b)Write JavaScript codes to validate your phone number without using reg-ex
c)Write JavaScript codes to validate your date of birth without using reg-ex
d) Write JavaScript codes to validate your email id using PERL reg-ex.
e)Write JavaScript codes to validate your phone number using PERL reg-ex.
f)Write JavaScript codes to validate your date of birth using PERL reg-ex.
THEORY:
JavaScript (/ˈdʒɑːvəˌskrɪpt/),[8] often abbreviated as JS, is a programming language that
conforms to the ECMAScript specification.[9] JavaScript is high-level, often just-in-time
compiled, and multi-paradigm. It has curly-bracket syntax, dynamic typing, prototype-based
object-orientation, and first-class functions.
Alongside HTML and CSS, JavaScript is one of the core technologies of the World Wide
Web.[10] JavaScript enables interactive web pages and is an essential part of web
applications. The vast majority of websites use it for client-side page behavior,[11] and all
major web browsers have a dedicated JavaScript engine to execute it.
As a multi-paradigm language, JavaScript supports event-driven, functional, and imperative
programming styles. It has application programming interfaces (APIs) for working with text,
dates, regular expressions, standard data structures, and the Document Object Model
(DOM).
CSE2017/097 25
NABANITA HALDER
CODE (a):
OUTPUT (a):
[email protected]
nabanita
CSE2017/097 26
NABANITA HALDER
CODE (b):
OUTPUT (b):
9967845690
0000
CSE2017/097 27
NABANITA HALDER
CODE (c):
OUTPUT (c):
CSE2017/097 28
NABANITA HALDER
CODE (d):
OUTPUT (d):
[email protected]
nabanita
CODE (e):
CSE2017/097 29
NABANITA HALDER
OUTPUT (e):
CODE (f):
OUTPUT (f):
REMARKS: JavaScript is one of the 3 languages all web developers must learn:
1. HTML to define the content of web pages
2. CSS to specify the layout of web pages
3. JavaScript to program the behavior of web pages
CSE2017/097 30
NABANITA HALDER