Web Technologies: CSS, XML, HTML, and Server Concepts
What is CSS? Discusss types of CSS with example
CSS (Cascading Style Sheets) is a stylesheet language used to describe the presentation of a document written in HTML or XML. CSS defines how elements on a web page should be displayed, including layout, colors, fonts, and more.
Inline CSS is useful for quick, one-time changes but can become unwieldy for larger projects due to its lack of separation between content and style.
Example:
This is an inline-styled paragraph.
Internal CSS allows for better organization of styles compared to inline CSS but is still limited to a single HTML document.
example: ////
////////
This is an internally-styled paragraph.
// ///
External CSS is the most scalable and maintainable approach, as it keeps the styling separate from the HTML structure, making it easier to manage and apply styles across multiple pages. Example: /// //
// //////
This is an externally-styled paragraph.
////.
What is XML ? Differentiate XML Schema WITH DTD
XML (Extensible Markup Language) is a flexible, structured language used to store and transport data. XML is designed to be both human-readable and machine-readable. Unlike HTML, which is used to display data, XML focuses on carrying data.
XML Schema: //-
XML Schema is a language used to define the structure, content, and semantics of XML documents. //-It is itself written in XML. //-XML Schema supports a wide range of data types, such as integer, string, date, and more, allowing for precise data validation. //-It allows for the creation of custom data types. //-XML Schema supports namespaces, which helps in avoiding name conflicts when combining XML documents from different sources. //-The syntax of XML Schema is complex but more powerful and flexible than DTD.
DTD:
//-DTD is used to define the structure and the legal elements and attributes of an XML document. //–It is not written in XML but has its own syntax. //-DTD supports basic data types and does not provide the same level of detail for data types as XML Schema. //-It is less precise in data validation compared to XML Schema //-DTD does not support namespaces, which can be a limitation when dealing with XML documents from multiple sources. //-The syntax of DTD is simpler but less powerful compared to XML Schema.
List common application of web server. Explain how server work
Web server is a computer where the web content is stored. Basically web server is used to host the web sites but there exists other web servers also such as gaming, storage, FTP, email etc. Web site is collection of web pages while web server is software that responds to the request for web resources. Examples of Web Servers are: Apache Tomcat and Resin. It can respond to the client request in either of the following two possible ways:
Generating response by using the script and communicating with database. –Sending file to the client associated with the requested URL. –Web servers often come as parts of a larger package of internet- and intranet- related programs that are used for: –Sending and receiving emails. –Downloading requests for File –Transfer Protocol (FTP) files. –Building and publishing Web pages. –Web developer may need to store small data temporarily at server side, for each user who is interacting with the web application. Such data is stored in a session, so session is a temporary storage at web server. For each user, there is unique session are at server.
U1
U2
U3
Above picture explain this idea; there are 3 users i.e. U1, U2, U3 interacting with the web-server, so there are 3 sessions at server side, one for each user i.e. S1 for U1, S2 for U2 and S3 for U3.
If we save data in session for U1, it would be stored in S1 bucket or session. When we would get data for Ul, it would be automatically read from S1 session. (Later I have explained how server keep track of which session bucket, belong to which user . In same way data stored for U2 goes in S2 and so on.
Describe the tag and attributed for a form in a HTML document.
HTML tags are the hidden keywords within a web page that define how your web browser must format and display the content. Most tags must have two parts, an opening and a closing part. For example, is the opening tag and is the closing tag. Note that the closing tag has the same text as the opening tag, but has an additional forward-slash (/) character. There are some tags that are an exception to this rule, and where a closing tag is not required. The tag for showing images is one example of this. Each HTML file must have the essential tags for it to be valid, so that web browsers can understand it and display it correctly. The rest of the HTML file can contain as little or as many tags as you want to display your content.
Example: // //
//My Page Title // //
This is where all my web page content goes! // //
Tag Attributes
Attributes allow us to customize a tag, and are defined within the opening
tag, for example: or
…
Attributes are often assigned a value using the equals sign, such as border=”0″ or width=”50%”, but there are some that only need to be declared in the tag like this:
.
Most attributes are optional for most tags, and are only used when you want to change something about the default way a tag is displayed by the browser. However, some tags such as the tag has required attributes such as src and alt which are needed in order for the browser to display the web page properly.
Explain Tier Technology with example.
Multitier architecture or multilayered architecture is client-server architecture in which presentation, application processing, and data management functions are physically separated. The most widespread use of multitier architecture is the three-tier architecture.
2-Tier Architecture: 2-tier architecture is used to describe client/server systems where the client requests resources and the server responds directly to the request, using its own resources. This means that the server does not call on another application in order to provide part of the service.
Fig:
3-Tier Architecture: In 3-tier architecture, there is an intermediary level, meaning the architecture is generally split up between:
A client, i.e. the computer, which requests the resources, equipped with a user interface (usually a web browser) for presentation purposes The application server (also called middleware), whose task it is to provide
the requested resources, but by calling on another server
The data server, which provides the application server with the data it requires
Fig:
An N-tier architecture (with N more than 3) is really 3 tier architectures in which the middle tier is split up into new tiers. The application tier is broken down into separate parts. What these parts are differs from system to system. The following picture shows it:
Fig:
The primary advantage of N-tier architectures is that they make load balancing possible. Since the application logic is distributed between several servers, processing can then be more evenly distributed among those servers.
N-tiered architectures are also more easily scalable, since only servers experiencing high demand, such as the application server, need be upgraded. The primary disadvantage of N-tier architectures is that it is also more difficult to program and test an N-tier architecture due to its increased
complexity.
Write short note on following: Cookies and XML DOM
Cookies
Ans: Cookies are messages that web servers pass to your web browser when you visit Internet sites. Your browser stores each message in a small file, called cookie.txt. When you request another page from the server, your browser sends the cookie back to the server. These files typically contain information about your visit to the web page, as well as any information you’ve volunteered, such as your name and interests.
Cookies are most commonly used to track website activity. When you visit some sites, the server gives you a cookie that acts as your identification card. Upon each return visit to that site, your browser passes that cookie back to the server. In this way, a web server can gather information about which web pages are used the most, and which pages are gathering the most repeat hits. Cookies are also used for online shopping. Online stores often use cookies that record any personal information you enter, as well as any items in your electronic shopping cart, so that you don’t need to re-enter this information each time you visit the site.
Servers can use cookies to provide personalized web pages. When you select preferences at a site that uses this option, the server places the information in a cookie. When you return, the server uses the information in the cookie to create a customized page for you.
XML DOM
Ans: 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 HTML DOM defines a standard way for accessing and manipulating HTML documents. It presents an HTML document as a tree-structure. The XML DOM defines a standard way for accessing and manipulating XML documents. It presents an XML document as a tree-structure.
Example: HTML DOM example
this is a Heading
onclick=”document.getElementById(‘demo’).innerHTML =Hello
World!”>Click Me!
Different Between Html Tags, Element, And Attribute.
HTML Tags: -HTML tags are used to hold the HTML element. –HTML tag starts with . –HTML tags are almost like keywords where every single tags has unique meaning. –example:
,
.
Element: HTML element holds the content. –whatever written within a HTML tag are HTML element. –HTML element specifics the general content. –example:
this is a paragraph.
HTML Attribute: -HTML attribute are used to describe the characteristics of an HTML element in detail. –HTML attributes are found only in the starting tag. –HTML attributes specify various additional properties to the existing HTML element. –Example: https://example.com“>link.
What are the rules for creating XML document? Write a XML code to store following information about student.
Each student has a name, address, phone and website element.
Address might appears multiple times
Address has attribute named “type” with value permanent and temporary phone must be 10 digits.
Ans: Rules for creating XML document are listed below
All xml must have a root element –All tags must be closed –All tags must be properly nested –Tag names have strict limits –Tag names are case sensitive –Tag names cannot contain spaces –Attribute values must appear within quotes. –White space is preserved. –Avoid html tags
XML code
Student.xml
<?xml version=”1.0″?> //http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=”xsfile.xsd“>
// //Bhupendra //
//
KTM-1
//234 //bhupendra.com
// //
xsfile.xsd
http://www.w3.org/2001/XMLSchema“>
//// // // // // //
what is HTML5 ? explain the characteristics of HTML5?
HTML5 is the latest version of the HyperText Markup Language (HTML), which is the standard language used to create and design web pages. HTML5 introduces new features and improvements to enhance the capabilities and performance of web applications.
Characteristic of HTML5:
Nav tag: defines a section of navigation links.
eg:// Home //About//////// Contact // .
Audio and Video Tag: Embed audio and video content.
Eg; ////. // //.
Header Tag: Represents introductory content or a set of navigational links.
Eg://
Welcome to My Website
// //Home ///Services/// Contact/// ////
Footer Tag: Represents footer content of a document or section.
Eg: //
© 2024 My Website. All rights reserved.
//
mark tag: Highlights text.
EG:
This is an important note.
main tag: Specifies the main content of a document.
Eg:
Main Content
This is where the main content goes.
Write HTML tag to generate the following table.
// ////
//
Average // | Red Eyes /// | ||
---|---|---|---|
Weight */// | |||
Males | 1.5 | 0.004 | 45% |
Females | 1.4 | 0.006 | 47% /// |
Design the following website’s Menu with use of HTML list and appropriate CSS.
|HOME | NEWS | CONTACT | ABOUT|
// ///
//// // //
in this example, we remove the bullets from the list, and its default padding and margin.
//
// ///
What are the rules for Well-formed xml document? Create a sample well- formed xml and validate it with DTD Schema.
Ans: The XML Syntax rules for Well-formed XML. include:
–All XML elements must have a closing tag. –XML tags are case-sensitive. –All XML elements must be properly nested. –All XML documents must have a root element. –Attribute values must always be quoted. –With XML, whitespace is preserved —
The Namespace-well-formed rules include: –All element and attribute names contain either zero or one colon. —No entity names, processing instruction targets, or notation names
Building XML Document
In HTML, we have to use predefined tags like or
for interpreting our data on the web. But, when using XML, user-defined tags can be created easily, and we use them to transport information between webpages.
<?xml version=”1.0″?>
Sohan
Bhatt
Section
sohan@section.io
Welcome message
CS CamScanner
Web Technology… 203
Validating using DTD
There are two types of DTD validations: Internal validation and External validation.
For internal validations, we will write the whole DTD in the same file as the XML file, which can be used for validation.
Similarly, the external validation will validate the XML based on the DTD written in a separate file with the .dtd extension.
If it’s an Internal DTD validation, it shows the whole XML code with its DTD
validation below:
<?xml version=”1.0″ encoding=”utf-8″?>
message)>
]>
Sohan
Bhatt
Section
sohan@section.io
Welcome messages/message
If it’s an External DTD validation, it can store the DTD code in a file called validation.dtd.
And now the DTD file can be referenced in XML as shown below:
<?xml version=”1.0″ encoding=”utf-8″?>
Sohan
Bhatt
Section
sohan@section.io
Welcome message
In both types of validations, DTD does the parsing based on the structure that defines the XML file.
What is a anonymous access ? Discuss about Integrated Windows authentication.
Anonymous access is the most common web site access control method. It allows anyone to visit the public areas of your web sites while preventing unauthorized users from gaining access to your web server’s critical administrative features and private information.
Integrated Windows Authentication (IWA) is a built-in Microsoft Internet Information Services (IIS) authentication protocol that can be used to automatically authenticate and sign-in a user to EMS Web App. Integrated Windows Authentication works only with Internet Explorer and is best used on intranets where all clients accessing EMS Web App are within a single domain. When a domain user who is logged on to a networked PC accesses an EMS Everyday User application, such as EMS Web App, EMS Mobile App, or EMS for Outlook, their Active Directory credentials (Domain\User ID) are compared against corresponding Domain User ID information recorded in the Network ID and or External Reference fields of your EMS Everyday User records. If a match exists, the Everyday User will be automatically logged in.
Configuring Integrated Windows Authentication
1. Go to Configure > My Proxy > Basic > General. In the Authentication section, click Integrated Windows Authentication On, and click Apply.
2. Configure the Global authentication options.
3. Join the Windows domain.
To join the domain:
Content Gateway must be able to resolve the domain name.
Content Gateway system time must be synchronized with the domain controller’s time, plus or minus 1 minute.
The correct domain Administrator name and password must be specified.
There must be TCP/UDP connectivity to the domain controller(s) (ports 88, 389, 445).
If backup domain controllers are configured, they and their Kerberos Distribution Center (KDC) services must be reachable by Content Gateway on the network
Critically analysis the pitfall of the 3-tier technology in comparison with n-
fier technology. Ans: 3-Tier Architecture
In 3-tier architecture, there is an intermediary level, meaning the architecture is generally split up between:
A client, i.e. the computer, which requests the resources, equipped with a user interface (usually a web browser) for presentation purposes
CS CamScanner
196… A Complete TU Solution of BCA Third Semester and Practice Sets
The application server (also called middleware), whose task it is to provide the requested resources, but by calling on another server
The data server, which provides the application server with the data it requires.
N-Tier Architecture (multi-tier)
N-tier architecture (with N more than 3) is really 3 tier architectures in which the middle tier is split up into new tiers. The application tier is broken down into separate parts. These parts are differs from system to system. The primary advantage of N-tier architectures is that they make load balancing possible. Since the application logic is distributed between several servers, processing can then be more evenly distributed among those servers. N- tiered architectures are also more easily scalable, since only servers experiencing high demand, such as the application server, need be upgraded. The primary disadvantage of N-tier architectures is that it is also more difficult to program and test an N-tier architecture due to its increased complexity.
Disadvantages of Three-Tier Architecture:
–It is more complex than the 2-tier client-server computing model, because it is more difficult to build a 3-tier application compared to a 2- tier application. The points of communication are doubled. —The client does not maintain a persistent database connection. —A separate proxy server may be required. —Network traffic will be increased if a separate proxy server is used. —The physical separation of application servers containing business logic functions and database servers containing databases may be something that affects performance. —-Improve complexity or effort.
PHP error type and error reporting:
E_ERROR: These are fatal run-time errors that halt script execution. Examples include memory allocation errors, accessing undefined variables, and calling undefined functions.
E_WARNING: These are non-fatal errors that occur at runtime, indicating potential issues in the code. Examples include using deprecated functions or attempting to include a file that doesn’t exist.
E_NOTICE: These are less severe runtime notices, typically for non-critical errors. Examples include accessing an undefined array index or variable.
Error reporting: PHP provides configuration settings to control which types of errors are reported and how they are handled. The error_reporting
directive in php.ini
or using ini_set()
in your PHP script determines the error reporting level:
error_reporting: Specifies which errors PHP reports.
display_errors: Determines whether errors are displayed to the user or logged.
log_errors: Specifies whether errors are logged to the server’s error log.
XSD
XSLT:
Teacher List
//Name | Subject |
---|---|
// /// | /// // |
Student List
///Roll Number | Name |
---|
Employee List
///FirstName |
---|