Internal 1
Internal 1
c) Multimedia content.
2. Construct style with CSS in a simple way?
Apply the basic, document-wide style sheet for the document by using the style
element.
Apply a style sheet to an individual element using the style attribute.
Link an external style sheet to the document using the link element.
Import a style sheet using the CSS @import notation.
3. List the HTML text formatting elements.
<b> - Bold text.
<strong> - Important text.
<i> - Italic text.
<em> - Emphasized text.
<mark> - Marked text.
<small> - Smaller text.
<del> - Deleted text.
<ins> - Inserted text.
4. Write the display method of input element attributes.
1
The input required attribute specifies that an input field must be filled out before
submitting the form. The required attribute works with the following input types: text,
search, url, tel, email, password, date pickers, number, checkbox, radio, and file.
5. Infer the use of system design specification in e commerce?
It is a process of planning a new business system or replacing an existing system
by defining its components or modules to satisfy the specific requirements.
Before planning, you need to understand the old system thoroughly and
determine how computers can best be used in order to operate efficiently.
System Design focuses on how to accomplish the objective of the system.
System Analysis and Design (SAD) mainly focuses on −
i. Systems
ii. Processes
iii. Technology
6. Mention the usage of responsive web design.
Responsive web design makes websites faster, more accessible, and easier to
navigate. It makes it easier for users to then find the information they are looking for
and typically encourages them to stay on your site. Plus, fantastic usability may
encourage users to come back to your website in the future.
7. Utilize the website optimization in e commerce.
eCommerce optimization is a holistic approach to improving your website and
allowing visitors to easily convert into customers. From navigation and design to
content and product descriptions, everything on your website should be intentionally
leading users towards the end goal: purchasing your products or services.
2
data from unauthorized users.
9. Illustrate the multi-layered nature of e-commerce security.
eCommerce security is the guideline that ensures safe transactions through the
internet. It consists of protocols that safeguard people who engage in online selling and
buying goods and services. We need to gain your customers’ trust by putting in place
eCommerce security basics. Such basics include:
Privacy
Integrity
Authentication
Non-repudiation
3
Part-B (5x16=80 Marks)
11.a. Analyse the code for video and audio attribute specification in HTML5. (16)
HTML5 features include native audio and video support without the need for Flash.
The HTML5 <audio> and <video> tags make it simple to add media to a website. You need to set src attribute to identify the media
source and include a controls attribute so the user can play and pause the media.
Embedding Video
Here is the simplest form of embedding a video file in your webpage −
<video src = "foo.mp4" width = "300" height = "200" controls>
Your browser does not support the <video> element.
</video>
The current HTML5 draft specification does not specify which video formats browsers should support in the video tag. But most
commonly used video formats are −
Ogg − Ogg files with Thedora video codec and Vorbis audio codec.
mpeg4 − MPEG4 files with H.264 video codec and AAC audio codec.
You can use <source> tag to specify media along with media type and many other attributes. A video element allows multiple source
elements and browser will use the first recognized format −
Live Demo
<!DOCTYPE HTML>
<html>
<body>
</body>
</html>
autoplay
1 This Boolean attribute if specified, the video will automatically begin to play back as soon
as it can do so without stopping to finish loading the data.
autobuffer
2 This Boolean attribute if specified, the video will automatically begin buffering even if it's
not set to automatically play.
4
controls
3 If this attribute is present, it will allow the user to control video playback, including volume,
seeking, and pause/resume playback.
height
4
This attribute specifies the height of the video's display area, in CSS pixels.
loop
5 This Boolean attribute if specified, will allow video automatically seek back to the start after
reaching at the end.
preload
6 This attribute specifies that the video will be loaded at page load, and ready to run. Ignored
if autoplay is present.
poster
7
This is a URL of an image to show until the user plays or seeks.
src
8 The URL of the video to embed. This is optional; you may instead use the <source> element
within the video block to specify the video to embed.
width
9
This attribute specifies the width of the video's display area, in CSS pixels.
Embedding Audio
HTML5 supports <audio> tag which is used to embed sound content in an HTML or XHTML document as follows.
<audio src = "foo.wav" controls autoplay>
Your browser does not support the <audio> element.
</audio>
The current HTML5 draft specification does not specify which audio formats browsers should support in the audio tag. But most
commonly used audio formats are ogg, mp3 and wav.
You can use <source&ggt; tag to specify media along with media type and many other attributes. An audio element allows multiple
source elements and browser will use the first recognized format −
Live Demo
<!DOCTYPE HTML>
<html>
<body>
5
<source src = "/html5/audio.ogg" type = "audio/ogg" />
<source src = "/html5/audio.wav" type = "audio/wav" />
Your browser does not support the <audio> element.
</audio>
</body>
</html>
autoplay
1 This Boolean attribute if specified, the audio will automatically begin to play back as soon
as it can do so without stopping to finish loading the data.
autobuffer
2 This Boolean attribute if specified, the audio will automatically begin buffering even if it's
not set to automatically play.
controls
3 If this attribute is present, it will allow the user to control audio playback, including volume,
seeking, and pause/resume playback.
loop
4 This Boolean attribute if specified, will allow audio automatically seek back to the start after
reaching at the end.
preload
5 This attribute specifies that the audio will be loaded at page load, and ready to run. Ignored
if autoplay is present.
src
6 The URL of the audio to embed. This is optional; you may instead use the <source> element
within the video block to specify the video to embed.
6
11.b. How does webserver works analyse it? List the applications of web server.
A web server is software and hardware that uses HTTP (Hypertext Transfer Protocol) and other protocols to respond
to client requests made over the World Wide Web. The main job of a web server is to display website content through
storing, processing and delivering webpages to users. Besides HTTP, web servers also support SMTP (Simple Mail
Transfer Protocol) and FTP (File Transfer Protocol), used for email, file transfer and storage.
Web server hardware is connected to the internet and allows data to be exchanged with other connected devices, while
web server software controls how a user accesses hosted files. The web server process is an example of
the client/server model. All computers that host websites must have web server software.
Web servers are used in web hosting, or the hosting of data for websites and web-based applications -- or web
applications.
7
When a web browser, like Google Chrome or Firefox, needs a file that's hosted on a web server, the browser will
request the file by HTTP. When the request is received by the web server, the HTTP server will accept the request,
find the content and send it back to the browser through HTTP.
More specifically, when a browser requests a page from a web server, the process will follow a series of steps. First, a
person will specify a URL in a web browser's address bar. The web browser will then obtain the IP address of the
domain name -- either translating the URL through DNS (Domain Name System) or by searching in its cache. This
will bring the browser to a web server. The browser will then request the specific file from the web server by an
HTTP request. The web server will respond, sending the browser the requested page, again, through HTTP. If the
requested page does not exist or if something goes wrong, the web server will respond with an error message. The
browser will then be able to display the webpage.
Many basic web servers will also support server-side scripting, which is used to employ scripts on a web server that
can customize the response to the client. Server-side scripting runs on the server machine and typically has a broad
feature set, which includes database access. The server-side scripting process will also use Active Server Pages (ASP),
Hypertext Preprocessor (PHP) and other scripting languages. This process also allows HTML documents to be created
dynamically.
8
Dynamic web browsers will consist of a web server and other software such as an application server and database. It
is considered dynamic because the application server can be used to update any hosted files before they are sent to a
browser. The web server can generate content when it is requested from the database. Though this process is more
flexible, it is also more complicated.
Apache HTTP Server. Developed by Apache Software Foundation, it is a free and open source web server for
Windows, Mac OS X, Unix, Linux, Solaris and other operating systems; it needs the Apache license.
Microsoft Internet Information Services (IIS). Developed by Microsoft for Microsoft platforms; it is not open
sourced, but widely used.
Nginx. A popular open source web server for administrators because of its light resource utilization and
scalability. It can handle many concurrent sessions due to its event-driven architecture. Nginx also can be used as
a proxy server and load balancer.
Lighttpd. A free web server that comes with the FreeBSD operating system. It is seen as fast and secure, while
consuming less CPU power.
Sun Java System Web Server. A free web server from Sun Microsystems that can run on Windows, Linux and
Unix. It is well-equipped to handle medium to large websites.
A web server‘s fundamental job is to accept and fulfill requests from clients for static content from a
website (HTML pages, files, images, video, and so on).
The client is almost always a browser or mobile application and the request takes the form of a Hypertext
Transfer Protocol (HTTP) message, as does the web server’s response.
Web server in Java is used to host Java web application.
Web Server supports Servlets and JSP.
9
12.a. Describe the different types of HTML input elements.
HTML Input Types
Here are the different input types you can use in HTML:
<input type="button">
<input type="checkbox">
<input type="color">
<input type="date">
<input type="datetime-local">
<input type="email">
<input type="file">
<input type="hidden">
<input type="image">
<input type="month">
<input type="number">
<input type="password">
<input type="radio">
<input type="range">
<input type="reset">
<input type="search">
<input type="submit">
<input type="tel">
<input type="text">
<input type="time">
<input type="url">
<input type="week">
10
Input Type Text
Example:
<form>
<label for="fname">First name:</label><br>
<input type="text" id="fname" name="fname"><br>
<label for="lname">Last name:</label><br>
<input type="text" id="lname" name="lname">
</form>
This is how the HTML code above will be displayed in a browser:
First name:
Last name:
Example:
<form>
<label for="username">Username:</label><br>
<input type="text" id="username" name="username"><br>
11
<label for="pwd">Password:</label><br>
<input type="password" id="pwd" name="pwd">
</form>
Username:
Password:
The form-handler is typically a server page with a script for processing input data.
Example:
<form action="/action_page.php">
<label for="fname">First name:</label><br>
<input type="text" id="fname" name="fname" value="John"><br>
<label for="lname">Last name:</label><br>
<input type="text" id="lname" name="lname" value="Doe"><br><br>
<input type="submit" value="Submit">
</form>
Last name:
submit
Bottom of Form
If we omit the submit button's value attribute, the button will get a default text:
<form action="/action_page.php">
<label for="fname">First name:</label><br>
<input type="text" id="fname" name="fname" value="John"><br>
<label for="lname">Last name:</label><br>
<input type="text" id="lname" name="lname" value="Doe"><br><br>
<input type="submit">
</form>
<input type="reset"> defines a reset button that will reset all form values to their default
values:
Example:
<form action="/action_page.php">
<label for="fname">First name:</label><br>
<input type="text" id="fname" name="fname" value="John"><br>
<label for="lname">Last name:</label><br>
<input type="text" id="lname" name="lname" value="Doe"><br><br>
13
<input type="submit" value="Submit">
<input type="reset">
</form>
First name:
Last name:
submit reset
Radio buttons let a user select ONLY ONE of a limited number of choices:
Example:
<form>
<input type="radio" id="html" name="fav_language" value="HTML">
<label for="html">HTML</label><br>
<input type="radio" id="css" name="fav_language" value="CSS">
<label for="css">CSS</label><br>
<input type="radio" id="javascript" name="fav_language" value="JavaScript">
<label for="javascript">JavaScript</label>
</form>
Checkboxes let a user select ZERO or MORE options of a limited number of choices.
Example:
<form>
<input type="checkbox" id="vehicle1" name="vehicle1" value="Bike">
<label for="vehicle1"> I have a bike</label><br>
<input type="checkbox" id="vehicle2" name="vehicle2" value="Car">
<label for="vehicle2"> I have a car</label><br>
<input type="checkbox" id="vehicle3" name="vehicle3" value="Boat">
<label for="vehicle3"> I have a boat</label>
</form>
Example:
The <input type="color"> is used for input fields that should contain a color.
Depending on browser support, a color picker can show up in the input field.
15
<form>
<label for="favcolor">Select your favorite color:</label>
<input type="color" id="favcolor" name="favcolor">
</form>
The <input type="date"> is used for input fields that should contain a date.
Depending on browser support, a date picker can show up in the input field.
Example:
<form>
<label for="birthday">Birthday:</label>
<input type="date" id="birthday" name="birthday">
</form>
You can also use the min and max attributes to add restrictions to dates:
Example:
<form>
<label for="datemax">Enter a date before 1980-01-01:</label>
<input type="date" id="datemax" name="datemax" max="1979-12-31"><br><br>
<label for="datemin">Enter a date after 2000-01-01:</label>
<input type="date" id="datemin" name="datemin" min="2000-01-02">
</form>
16
Input Type Email
The <input type="email"> is used for input fields that should contain an e-mail address.
Depending on browser support, the e-mail address can be automatically validated when
submitted.
Some smartphones recognize the email type, and add ".com" to the keyboard to match
email input.
Example:
<form>
<label for="email">Enter your email:</label>
<input type="email" id="email" name="email">
</form>
Example:
<form>
<input type="image" src="img_submit.gif" alt="Submit" width="48" height="48">
</form>
17