PART A:before writing program 1 to 6 write the below concept on ruled page then write 1
to 6 programs with individual concepts
HTML Introduction
HTML, or HyperText Markup Language, is the standard markup language used to create web pages. It’s a
combination of Hypertext, which defines the link between web pages, and Markup language, which is
used to define the text document within tags to structure web pages. This language is used to annotate
text so that machines can understand and manipulate it accordingly.
HTML consists of various elements, that are responsible for telling search engines how to display page
content. For example, headings, lists, images, links, and more.
Features of HTML
It is easy to learn and easy to use.
It is platform-independent.
Images, videos, and audio can be added to a web page.
HTML Elements and Tags
HTML uses predefined tags and elements that instruct the browser on how to display the content. HTML
elements include an opening tag, some content, and a closing tag. It’s important to remember to include
closing tags. HTML Page Structure
The basic structure of an HTML page is shown below. It contains the essential building-block elements
(i.e. doctype declaration, HTML, head, title, and body elements) upon which all web pages are created.
HTML page structure
<!DOCTYPE html> – This is the document type declaration (not technically a tag). It declares a document
as being an HTML document. The doctype declaration is not case-sensitive.
<html> – This is called the HTML root element. All other elements are contained within it.
<head> – The head tag contains the "behind the scenes" elements for a webpage. Elements within the
head aren’t visible on the front end of a webpage. HTML elements used inside the <head> element
include:
<style> – This HTML tag allows us to insert styling into our web pages and make them appealing to look
at with the help of CSS.
<title> – The title is what is displayed on the top of your browser when you visit a website and contains
the title of the webpage that you are viewing.
<body> – The body tag is used to enclose all the visible content of a webpage. In other words, the body
content is what the browser will show on the front end.
Advantages of HTML
HTML is used to build websites.
It is supported by all browsers.
It can be integrated with other languages like CSS, JavaScript, etc.
Disadvantages of HTML
HTML can only create static web pages. For dynamic web pages, other languages have to be used.
A large amount of code has to be written to create a simple web page.
The security feature is not good.
HTML History
HTML is a markup language used by the browser to manipulate text, images, and other content,
in order to display it in the required format. HTML was created by Tim Berners-Lee in 1991. The
first-ever version of HTML was HTML 1.0, but the first standard version was HTML 2.0,
published in 1995.
PART A:before writing program 7 and 8, write the below concept on ruled page then write
7 & 8th programs with individual concepts
CSS Introduction
CSS (Cascading Style Sheets) is a language designed to simplify the process of making web
pages presentable. It allows you to apply styles to HTML documents, describing how a webpage
should look by prescribing colors, fonts, spacing, and positioning. CSS provides developers and
designers with powerful control over the presentation of HTML elements.
Why CSS?
Saves Time: Write CSS once and reuse it across multiple HTML pages.
Easy Maintenance: Change the style globally with a single modification.
Search Engine Friendly: Clean coding technique that improves readability for search
engines.
Superior Styles: Offers a wider array of attributes compared to HTML.
Offline Browsing: CSS can store web applications locally using offline cache, allowing
offline viewing.
A CSS Syntax rule consists of a selector, property, and its value. The selector points to the
HTML element where the CSS style is to be applied. The CSS property is separated by
semicolons. It is a combination of the selector name followed by the property: value pair that is
defined for the specific selector. let us see the syntax and how we can use the CSS to modernize
the website.
CSS Syntax
Syntax
selector { Property: value; }
For instance, we have declared a heading tag (h1) along with having assigned some property:
value pair that is used to style the heading tag. Here, h1 is the selector, { color: green; font-
family: sans-serif; } is a declaration block and it can contain one or more declarations separated
by semicolons, color: green; is a property: value pair that is applied to the HTML element to
style them.
Every declaration has a CSS property name and a value, separated by a colon(:) and is
surrounded by curly braces({ }). For declaring the multiple CSS properties, it can be separated
by the semicolon(;).
these are:
Declaration: A combination of a property and its corresponding value.
Selector: Used to target and select specific HTML elements to apply styles to.
Property: Defines the specific aspect or characteristic of an element that you want to
modify.
Value: Assigned setting or parameter for a given property, determining how the selected
element should appear or behave.
PART B:before writing program 1 to 5, write the below concept on ruled page then write 1
to 5 programs with individual concepts
JavaScript is used to create client-side dynamic pages.JavaScript is an object-based scripting
language which is lightweight and cross-platform.JavaScript is not a compiled language, but it is
a translated language. The JavaScript Translator (embedded in the browser) is responsible for
translating the JavaScript code for the web browser.
What is JavaScript
JavaScript (js) is a light-weight object-oriented programming language which is used by several
websites for scripting the webpages. It is an interpreted, full-fledged programming language that
enables dynamic interactivity on websites when applied to an HTML document. It was
introduced in the year 1995 for adding programs to the webpages in the Netscape Navigator
browser.
Features of JavaScript
There are following features of JavaScript:
All popular web browsers support JavaScript as they provide built-in execution
environments.
JavaScript follows the syntax and structure of the C programming language. Thus, it is a
structured programming language.
JavaScript is a weakly typed language, where certain types are implicitly cast (depending
on the operation).
JavaScript is an object-oriented programming language that uses prototypes rather than
using classes for inheritance.
It is a light-weighted and interpreted language.
It is a case-sensitive language..
Application of JavaScript:
Client-side validation,
Dynamic drop-down menus,
Displaying date and time,
Displaying pop-up windows and dialog boxes (like an alert dialog box, confirm dialog
box and prompt dialog box),
PART B:before writing program 6 to 8, write the below oncept on ruled page then write 6 to
8th programs with individual concepts
SERVLETS
What is Java Servlet?
Java Servlets are the Java programs that run on the Java-enabled web server or application
server. They are used to handle the request obtained from the web server, process the request,
produce the response, and then send a response back to the web server.
Properties of Java Servlet
The properties of Servlets are as follows:
Servlets work on the server side.
Servlets are capable of handling complex requests obtained from the web server.
CGI:(Common Gateway Interface):CGI is actually an external application that is written by
using any of the programming languages like C or C++ and this is responsible for processing
client requests and generating dynamic content.
Difference between Java Servlets and CGI
Servlet CGI (Common Gateway Interface)
1)Servlets are portable and efficient. 1)CGI is not portable.
2)In Servlets, sharing data is possible. 2)In CGI, sharing data is not possible.
3)Servlets can directly communicate with the webserver 3) CGI cannot directly
communicate with the webserver.
4)Servlets are less expensive than CGI. 4)CGI is more expensive than Servlets.
5)Servlets can handle the cookies. 5)CGI cannot handle the cookies.
Steps to compile and execute the servlet program is
step1:Open NetBeans IDE 8.0.2
step2:NetBeans IDE is started
step3:Go to File menu and click on New Project
step4:select java web->web applications .click on next
step5:type java servlet class(i.e dateser) name in project name.click on next
step6:click next
step7:click finish
stpe 8:right click on project dateser->new->servlet then press enter key
step 9:type java class name(i.e dateser) .click on next
stpe 10:click on check box of web.xml.click finish
step11:type the code in index.html file and save the file
step12:type the code in dateser.java file and save it
step12:right click on project->run
step 13:right click on project->run
ste14:program is executed on browser