0% found this document useful (0 votes)
87 views

..What Is CSS ? Create A Sample Code To Illustrate The External Stylesheet For Your

CSS is a language for styling and formatting web pages. It allows control over colors, fonts, layout, and other design elements. There are three ways to insert CSS - external, internal, and inline styling. The example provided demonstrates external CSS styling through a "mystyle.css" external stylesheet linked to an HTML file.

Uploaded by

abhi
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
87 views

..What Is CSS ? Create A Sample Code To Illustrate The External Stylesheet For Your

CSS is a language for styling and formatting web pages. It allows control over colors, fonts, layout, and other design elements. There are three ways to insert CSS - external, internal, and inline styling. The example provided demonstrates external CSS styling through a "mystyle.css" external stylesheet linked to an HTML file.

Uploaded by

abhi
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

..What is CSS ?

Create a sample code to illustrate the external


stylesheet for your web page.
Ans:-

Cascading Style Sheets, fondly referred to as CSS, is a


simple design language intended to simplify the process of
making web pages presentable.
CSS handles the look and feel part of a web page. Using
CSS, you can control the color of the text, the style of fonts,
the spacing between paragraphs, how columns are sized and
laid out, what background images or colors are used, layout
designs,variations in display for different devices and screen
sizes as well as a variety of other effects.
CSS is easy to learn and understand but it provides powerful
control over the presentation of an HTML document.

There are three ways of inserting a style sheet:

 External style sheet


 Internal style sheet
 Inline style

<html>
<head>
<link rel="stylesheet" type="text/css" href="mystyle.css”>
</head>
<body>
<h1>This is my Sample File.</h1>
</body>
</html>
Here is how the "mystyle.css" looks:

body {
background-color: lightblue;}
h1 {
color: navy;
margin-left: 20px;}
===========================================================
W hat are JDBC Driver(s) ? Name them and differentiate
between Two and Three tier database access modifier?
Ans: JDBC Driver is a software component that enables java application to
interact with the database.There are 4 types of JDBC drivers:

1. JDBC-ODBC bridge driver

2. Native-API driver (partially java driver)

3. Network Protocol driver (fully java driver)

4. Thin driver (fully java driver)


5. JDBC-ODBC bridge driver

The JDBC-ODBC bridge driver uses ODBC driver to connect to the database.
The JDBC-ODBC bridge driver converts JDBC method calls into the ODBC
function calls. This is now discouraged because of thin driver.
Advantages:

o easy to use.

o can be easily connected to any database.


Three-tier architecture typically comprise a presentation tier,
a business or data access tier, and a data tier. Three layers in the three tier
architecture are as follows:
1) Client layer
2) Business layer
3) Data layer

1) Client layer:

It is also called as Presentation layer which contains UI part of our application.


This layer is used for the design purpose where data is presented to the user or
input is taken from the user. For example designing registration form which
contains text box, label, button etc.

2) Business layer:

In this layer all business logic written like validation of data, calculations, data
insertion etc. This acts as a interface between Client layer and Data Access
Layer. This layer is also called the intermediary layer helps to make
communication faster between client and data layer.

3) Data layer:

In this layer actual database is comes in the picture. Data Access Layer contains
methods to connect with database and to perform insert, update, delete, get data
from database based on our input data.

Three-tier Architecture

Advantages

1. High performance, lightweight persistent objects


2. Scalability – Each tier can scale horizontally
3. Performance – Because the Presentation tier can cache requests, network
utilization is minimized, and the load is reduced on the Application and Data
tiers.
4. High degree of flexibility in deployment platform and configuration
5. Better Re-use
6. Improve Data Integrity
7. Improved Security – Client is not direct access to database.
8. Easy to maintain and modification is bit easy, won’t affect other modules
9. In three tier architecture application performance is good.

Disa//dvantages

1. Increase Complexity/Effort

Two-Tier Architecture:
The two-tier is based on Client Server architecture. The two-tier architecture is
like client server application. The direct communication takes place between client
and server. There is no intermediate between client and server. Because of tight
coupling a 2 tiered application will run faster.

The Two-tier architecture is divided into two parts:

1) Client Application (Client Tier)


2) Database (Data Tier)
Advantages:

1. Easy to maintain and modification is bit easy


2. Communication is faster

Disadvantages:

1. In two tier architecture application performance will be degrade upon


increasing the users.
2. Cost-ineffective

Explain the concept of Document Object Model (DOM) with the help of an example.

Ans: "The W3C Document Object Model (DOM) is a platform and language-neutral interface that
allows programs and scripts to dynamically access and update the content, structure, and style of
a document."

The W3C DOM standard is separated into 3 different parts:

 Core DOM - standard model for all document types


 XML DOM - standard model for XML documents
 HTML DOM - standard model for HTML documents

What is the HTML DOM?


The HTML DOM is a standard object model and programming interface for HTML. It defines:

 The HTML elements as objects


 The properties of all HTML elements
 The methods to access all HTML elements
 The events for all HTML elements

In other words: The HTML DOM is a standard for how to get, change, add, or delete HTML
elements.

<html>
<body>

<p id="demo"></p>

<script>
document.getElementById("demo").innerHTML = "Hello World!";
</script>
</body>
</html>

In the example above, getElementById is a method, while innerHTML is a property.

==========================================================================================

===========================================================================================

You might also like