unit 2 wt full notes
unit 2 wt full notes
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
CSS stands for Cascading Style Sheets. It is a style sheet language used to style and enhance
website presentation.
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 by prescribing colors, fonts, spacing,
and positioning.
• The main advantages are the separation of content (in HTML) and styling (in CSS) and
the same CSS rules can be used across all pages and not have to be rewritten.
• HTML uses tags and CSS uses rule sets.
• CSS styles are applied to the HTML element using selectors.
CSS Syntax
CSS consists of style rules that are interpreted by the browser and applied to the corresponding
elements.
Each declaration includes a CSS property name and a value, separated by a colon.
Multiple CSS declarations are separated with semicolons, and declaration blocks are surrounded
by curly braces.
Example:
// CSS Style
Selector - h1
---------------
CSS (Cascading Style Sheets) is used to style and layout of web pages, and controlling the
appearance of HTML elements. CSS targets HTML elements and applies style rules to dictate
their appearance.
1. Inline CSS
2. Internal or Embedded CSS
3. External CSS
1. Inline CSS
• Inline CSS involves applying styles directly to individual HTML elements using
the style attribute.
• This method allows for specific styling of elements within the HTML document,
overriding any external or internal styles.
Example:
<html>
<body>
<p style="color:green;font-size:50px;font-style:italic;text-align:center;">
This is the demo on inline CSS
css-Cascading Style Sheet
</p>
</html>
Pros of inline CSS:
• Inline CSS, adding CSS rules to HTML elements is time-consuming and messes up the
HTML structure.
• It styles multiple elements at the same time which can affect the page size and download
time of the page.
Internal or Embedded CSS is defined within the HTML document’s <style> element.
It applies styles to specified HTML elements.
The CSS rule set should be within the HTML file in the head section i.e. the CSS is embedded
within the <style> tag inside the head section of the HTML file.
Example:
<html>
<head>
<style>
body{background-color: black;}
h2 {color: red;padding: 50px; }
p{color:blue}
</style>
</head>
<body>
<h2>CSS types</h2>
<p>Cascading Style sheet types: inline, external and internal</p>
</body>
</html>
Pros of internal css:Adding code in the HTML document will reduce the page size and loading
time of the webpage.
Internal CSS cannot upload multiple files when we add the code with the HTML page
3. External CSS
External CSS contains separate CSS files that contain only style properties with the help of tag
attributes (For example class, id, heading, … etc). CSS property is written in a separate file with
a .css extension and should be linked to the HTML document using a link tag. It means that, for
each element, style can be set only once and will be applied across web pages.
Example:
Write a separate file containing the styles and save it with .css extension
style.css
body{background-color: black;}
p{color:blue}
----------------------
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<h2>CSS types</h2>
</body>
</html>
Output:
Pros of External CSS:
• We use the same .css file for multiple web pages in external CSS.
• The pages cannot be delivered correctly before the external CSS is loaded.
• In External CSS, uploading many CSS files can increase the download time of a website.
Note: Inline CSS has the highest priority, so it overrides internal and external styles.
Internal CSS comes next, overriding external styles, while external CSS is applied only if
no inline or internal styles are set.
--------------------------------------
INDEX
Sl no CONTENT Pg no
1 Introduction to XML 1-2
• Features of XML
• Applications of XML
2 Defining XML tags, their attributes and values 2-8
• Structure of XML document
3 Document Type Definition (DTD) 8-11
• Internal DTD
• External DTD
• Limitations of DTD
4 XML Schemas 11-13
• XML XSD(XML Schema Definition)
5 Document Object Model 14-17
• XML DOM
6 17-24
XHTML Parsing XML Data
DOM Parser
• Features of DOM Parser
• Advantages of DOM Parser
• Disadvantages of DOM Parser
SAX Parser
• Features of SAX Parser
• Advantages of SAX Parser
• Disadvantages of SAX Parser
INDEX FOR PROGRAMS
parser
Introduction to XML
▪ XML stands for EXtensible Markup Language
▪ XML tags are not prédéfinie in XML,we need to define Our own tags.
▪ XML uses a DTD (Document Type Definition) to formally describe the data.
▪ XML user to define the formatting rules for the user defined tags.
▪ XML became a World Wide Web Consortium (W3C)Recommendation on February 10, 1998.
Markup language: A markup language is a modern system for highlight or underline a document.
• With XML, data can be stored in separate XML files. This way separate focus on using
HTML/CSS for display and layout is possible, and changes in the underlying data will not
require any changes to the HTML.
• With a few lines of JavaScript code, an external XML file can be read and the data
content of web page can updated.
• In the real world, computer systems and databases contain data in incompatible formats.
• XML data is stored in plain text format. This provides a software- and hardware-
independent way of storing data.
• This makes it much easier to create data that can be shared by different applications.
Page 1
CSE Dpet., CMREC
• One of the most time-consuming challenges for developers is to exchange data between
incompatible systems over the Internet.
• Exchanging data as XML greatly reduces this complexity, since the data can be read by
different incompatible applications.
• Different applications can access your data, not only in HTML pages, but also from XML
data sources.
• With XML, your data can be available to all kinds of "reading machines" (Handheld
computers, voice machines, news feeds, etc), and make it more available for blind people,
or people with other disabilities.
Page 2
CSE Dpet., CMREC
end-tag.
▪ Attribute: defined in the start-tag to provide extra information about the element, in the form
of attribute_name="attribute_value".
▪ Entities References: in the form of &name;, e.g., < (<), > (>), & (&), " ("),
and ' (').
▪ Character References: in the form of &#decimal-number; or &#xhex-code; for replacing any
Unicode character, e.g., both © and © can be used for copyright symbol ©.
▪ PCDATA (Parsed Character Data): Text between start-tag and end-tag that will be examined
by the parser for entity references and nested elements.
▪ CDATA (Character Data): Text between start-tag and end-tag that will NOT be examined
by the parser for entity references and nested tags.
XML documents create a hierarchical structure looks like a tree so it is known as XML Tree that
starts at "the root" and branches to "the leaves".
Page 3
CSE Dpet., CMREC
The terms parent, child, and sibling are used to describe the relationships between elements.
Parent have children. Children have parents. Siblings are children on the same level (brothers
and sisters).
Explanation:
The first line is the XML declaration. This line is called the XML prolog.
The XML prolog is optional. If it exists, it must come first in the document.
It defines the XML version (1.0) and the encoding used (ISO-8859-1 = Latin-1/West European
character set).
The next line describes the root element of the document (like saying: "this document is a note"):
The next 4 lines[3,4,5,6 lines] describe 4 child elements of the root (to, from, heading, and body)
And finally the last line defines the end of the root element.
Page 4
CSE Dpet., CMREC
XML Element
• XML elements can be defined as building blocks of an XML. Elements can behave as
containers to hold text, elements, attributes, media objects, or all of these.
• Each XML document contains one or more elements, the scope of which are either
delimited by start and end tags, or for empty elements, by an empty-element tag.
Syntax:
Following is the syntax to write an XML element:
<element-name attribute1 attribute2>
....content
</element-name>
Where,
element-name is the name of the element. The name its case in the start and end tags must match.
• text
• attributes
• other elements
• or a mix of the above
<bookstore>
<book category="children">
<title>Harry Potter</title>
<author>J K. Rowling</author>
<year>2005</year>
<price>29.99</price>
</book>
<book category="web">
<title>Learning XML</title>
<author>Erik T. Ray</author>
<year>2003</year>
<price>39.95</price>
</book>
</bookstore>
Page 5
CSE Dpet., CMREC
<title>, <author>, <year>, and <price> have text content because they contain text (like 29.99).
<bookstore> and <book> have element contents, because they contain elements.
XML Attribute
▪ Attribute: defined in the start-tag to provide extra information about the element,
in the form of attribute_name="attribute_value",they define properties of elements.
An XML attribute is always a name-value pair.
Syntax:
An XML attribute has the following syntax:
<element-name attribute1 attribute2 >
....content..
< /element-name>
Where,
Page 6
CSE Dpet., CMREC
<bookstore>
<book category="children">
<title>Harry Potter</title>
<?xml version="1.0"
<author>J encoding="UTF-8"?>
K. Rowling</author>
<!DOCTYPE
<year>2005</year> [
garden
<!ELEMENT garden (plants)*>
<price>29.99</price>
<!ELEMENT
</book> plants (#PCDATA)>
<!ATTLIST plants category CDATA #REQUIRED>
<book category="web">
]><title>Learning XML</title>
<garden>
<author>Erik T. Ray</author>
<plants category="flowers" />
<year>2003</year>
<plants category="shrubs">
<price>39.95</price>
</plants>
</book>
</garden>
</bookstore>
Attribute Types
Attribute Type Description
StringType It takes any literal string as a value. CDATA is a StringType. CDATA
is character data. This means, any string of non-markup characters
is a legal part of the attribute.
TokenizedType This is a more constrained type. The validity constraints noted in the
grammar are applied after the attribute value is normalized. The
TokenizedType attributes are given as:
ID: It is used to specify the element as unique.
IDREF: It is used to reference an ID that has been named for another
element.
IDREFS: It is used to reference all IDs of an element.
ENTITY: It indicates that the attribute will represent an external
entity in the document.
ENTITIES: It indicates that the attribute will represent external
entities in the document.
NMTOKEN: It is similar to CDATA with restrictions on what data
can be part of the attribute.
NMTOKENS: It is similar to CDATA with restrictions on what data
can be part of the attribute.
EnumeratedType This has a list of predefined values in its declaration, out of which, it
must assign one value. There are two types of enumerated attribute:
Notation Type: It declares that an element will be referenced to a
NOTATION declared somewhere else in the XML document.
Enumeration: Enumeration allows you to define a specific list of
values that the attribute value must match.
Page 7
CSE Dpet., CMREC
❖ DTD defines the structure and legal elements and attributes of an XML document.
❖ DTDs check vocabulary and validity of the structure of XML documents against
grammatical rules of appropriate XML language.
❖ It specifies a set of constraints and establishes the trees that are acceptable in an XML
document.
Syntax
Basic syntax of a DTD is as follows:
<!DOCTYPE element DTD identifier
[
declaration1
declaration2
........
]>
In the above syntax,
❖ The DTD starts with <!DOCTYPE delimiter.
❖ An element tells the parser to parse the document from the specified root element.
❖ DTD identifier is an identifier for the document type definition, which may be the
Page 8
CSE Dpet., CMREC
i)Elements :
the syntax of declaring Element
< !ELEMENT element_name category>
Or
< !ELEMENT element_name (element-content)>
Page 9
In above example : element name is payment ;
attribute name is type ; attribute type is CDATA ; attribute value is Check
Page 10
Page 11
Page 12
Internal DTD
A DTD is referred to as an internal DTD, if elements are declared within the XML files.
To refer it as internal DTD, standalone attribute in XML déclaration must be set to « yes ».
This means, the declaration works independent of an external source.
Syntax
Following is the syntax of internal DTD:
<!DOCTYPE root-element [element-declarations]>
where root-element is the name of root element and element-declarations is where you
declare the elements.
address.xml
Start Declaration - Begin the XML declaration with the following statement.
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
DTD - Immediately after the XML header, the document type declaration follows,
commonly referred to as the DOCTYPE:
<!DOCTYPE address [
The DOCTYPE declaration has an exclamation mark (!) at the start of the element name.
The DOCTYPE informs the parser that a DTD is associated with this XML document.
DTD Body - The DOCTYPE declaration is followed by the body of the DTD, where you
declare elements, attributes, entities, and notations.
<!ELEMENT address (name,company,phone)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT company (#PCDATA)>
<!ELEMENT phone_no (#PCDATA)>
End Declaration - Finally, the declaration section of the DTD is closed using a closing bracket and
a closing angle bracket (]>). This effectively ends the definition, and thereafter, the XML
document follows immediately.
Page 13
If the xml is follows the structure that is specified then it is called as valid XML otherwise it
is called as invalid XML
To check wether above xml is valid or not we will write an PHP file as follows
<?php
$xml=new DOMDocument;
$xml->load('address.xml');
if($xml->validate())
{
echo "it is valid document";
}
else
{
echo "it is invalid document";
}
?>
Output :
it is valid document
-------------------------------
Page 14
Page 15
In external DTD elements are declared outside the XML file. They are
accessed by specifying the system attributes which may be either the legal .dtd file or a valid URL.
To refer it as external DTD, standalone attribute in the XML declaration must be set as no. This
means, declaration includes information from the external source.
Syntax
Following is the syntax for external DTD:
<!DOCTYPE root-element SYSTEM "file-name">
where file-name is the file with .dtd extension.
Page 16
C 2.5 XML External DTD
<?php
$xml=new DOMDocument;
$xml->load('Add.xml');
if($xml->validate())
{
echo "it is valid document";
}
else
{
echo "it is invalid document";
}
?>
Page 17
Limitations of DTD:
❖ DTD has its own syntax (which is inherited from SGML DTD) and requires a dedicate
processing tool to process the content. It does not use XML syntax and XML processor.
❖ DTD does not support object-oriented concepts such as hierarchies and inheritance.
❖ DTD's data type is limited to text string; and does not support other data types like
number, date etc.
Page 18
XML Schemas
Syntax
1. SimpleType
2. ComplexType
SimpleType
The simpleType allows you to have text-based elements. It contains less attributes, child elements, and cannot
be left empty.
Example : xs :integer , xs :boolean , xs :string ; xs :date
<xs:element name="phone" type="xs:int" />
ComplexType
The complexType is a container for other elements definations.Ihis allows you to hold multiple attributes sub
elements for an element . It can contain additional sub elements and can be left empty.
<xs:element name="contact">
<xs:complexType>
<xs:sequence>
<xs:element name="name" type="xs:string" />
<xs:element name="company" type="xs:string" />
<xs:element name="phone" type="xs:int" />
</xs:sequence>
</xs:complexType>
</xs:element>
XML schema
employee.xsd
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="contact">
<xs:complexType>
<xs:sequence>
</xs:sequence>
</xs:complexType>
Description of XML Schema for the above code
</xs:element>
<xs:element name=" contact "> : It defines the element name contact.
<xs:complexType> : It defines that the element ' contact ' is complex type.
</xs:schema>
<xs:element name="company" type="xs:string"/> : It defines that the element ' company ' is of
string/text type.
<xs:element name="phone" type="xs:int"/> : It defines that the element ' phone ' is of
string/integer type.
The basic idea behind XML Schemas is that they describe the acceptable format that an
XML document can take.
employee.xml
<?xml version="1.0"?>
<contact xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="employee.xsd">
<name>uma</name>
<company>cmrec</company>
<phone>123456789</phone>
</contact>
1) DTD stands for Document Type Definition. XSD stands for XML Schema Definition.
2) DTDs are derived from SGML syntax. XSDs are written in XML.
3) DTD doesn't support datatypes. XSD supports datatypes for elements and attributes.
5) DTD doesn't define order for child elements. XSD defines order for child elements.
7) DTD is not simple to learn. XSD is simple to learn because you don't need to learn new
language.
8) DTD provides less control on XML structure. XSD provides more control on XML structure.
CDATA vs PCDATA
CDATA
CDATA: (Unparsed Character data): CDATA contains the text which is not parsed further in an XML document. Tags inside
the CDATA text are not treated as markup and entities will not be expanded.Let's take an example for CDATA:
1. <?xml version="1.0"?>
2. <!DOCTYPE employee SYSTEM "employee.dtd">
3. <employee>
4. <![CDATA[
5. <firstname>uma</firstname>
6. <lastname>desa</lastname>
7. <email>uma.vishwam@cmrec.ac.in</email>
8. ]]>
9. </employee>
In the above CDATA example, CDATA is used just after the element employee to make the data/text unparsed, so it will
give the value of employee:
<firstname>uma</firstname>
<lastname>desa</lastname>
<email>uma.vishwam@cmrec.ac.in</email>
PCDATA
PCDATA: (Parsed Character Data): XML parsers are used to parse all the text in an XML document. PCDATA stands for
Parsed Character data. PCDATA is the text that will be parsed by a parser. Tags inside the PCDATA will be treated as
markup and entities will be expanded.In other words you can say that a parsed character data means the XML parser
examine the data and ensure that it doesn't content entity if it contains that will be replaced.
1. <?xml version="1.0"?>
2. <!DOCTYPE employee SYSTEM "employee.dtd">
3. <employee>
4. <firstname>uma</firstname>
5. <lastname>desa</lastname>
6. <email>uma.vishwam@cmrec.ac.in</email>
7. </employee>
Output :
uma
desa
uma.vishwam@cmrec.ac.in
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Document Object Model
<TABLE>
<ROWS>
<TR>
<TD>A</TD>
<TD>B</TD>
</TR>
<TR>
<TD>C</TD>
<TD>D</TD>
</TR>
</ROWS>
</TABLE>
The Equivalent Document Object Model representation for the above html code.
This below code retrieves the text value of the first <title> element in an XML document:
txt=xmlDoc.getElementsByTagName("title")[0].childNodes[0].nodeValue;
XML parser is a software library or a package that provides interface for client applications to
work with XML documents. It checks for proper format of the XML document and may also
validate the XML documents. Modern day browsers have built-in XML parsers.
A DOM document is an object which contains all the information of an XML document. It is
composed like a tree structure. The DOM Parser implements a DOM API.
DOM is an object-oriented API. The DOM parser explicitly builds an object model, in the form of
a tree structure, to represent an XML document. Your application can then manipulate the nodes
in the tree. DOM is a platform- and language-independent interface for processing XML
documents. The DOM API defines the mechanism for querying, traversing and manipulating the
object model built.
Page 19
A DOM Parser creates an internal structure in memory which is a DOM document object and the
client applications get information of the original XML document by invoking methods on this
document object. DOM Parser has a tree based structure.
Page 20
CSE Dpet., CMRE
import org.w3c.dom.*;
import javax.xml.parsers.*;
import java.io.*;
import java.util.Scanner;
//Build Document
--PTO--
Page 21
CSE Dpet., CMREC
--Contd…
document.getDocumentElement().normalize();
String id=s.next();
if (node.getNodeType() == Node.ELEMENT_NODE)
if(eElement.getAttribute("id").equals(id)){
System.out.println("Location : " +
eElement.getElementsByTagName("location").item(0).getTextContent());
}}}}}
Page 22
CSE Dpet., CMREC
<employees>
<employee id="111">
<firstName>Naresh</firstName>
<lastName>Gupta</lastName>
<location>India</location>
</employee>
</employees>
OUTPUT:
First Name: Naresh
Last Name Gupta
Location India
1) It supports both read and write operations and the API is very simple to use.
1) It is memory inefficient. (consumes more memory because the whole XML document needs
to loaded into memory).
Page 23
CSE Dpet., CMREC
SAX is an event-driven API. The SAX API defines a number of callback methods, which will be
called when events occur during parsing. The SAX parser reads an XML document and generate
events as it finds elements, attributes, or data in the document. There are events for document start,
document end, element start-tags, element end-tags, attributes, text context, entities, processing
instructions, comments and others.
Clients do not know what methods to call, they just overrides the methods of the API and place
his own code inside method.
Page 24
CSE Dpet., CMREC
C 2.11 Code snippet for importing classes required for SAX parser
package sax;
import javax.xml.parsers.*;
import org.xml.sax.*;
import org.xml.sax.helpers.*;
import java.util.*;
import java.io.*;
if (filename == null) {
usage();
}
}
Page 25
CSE Dpet., CMREC
// ...
Page 26
CSE Dpet., CMREC
2) Clients never know the full information because the data is broken into pieces.
Page 27
XHTML Introduction
•
XHTML or EXtensible HyperText Markup Language is a mix of HTML and XML, very
similar to HTML but stricter. It’s like a rulebook for creating web pages that browsers easily
understand. Unlike HTML, you have to be careful and follow the rules exactly. Most browsers
support it. Just think of it as a more precise way to write web code.
History
It was developed by the World Wide Web Consortium (W3C) and helps web developers
transition from HTML to XML. With XHTML, developers can enter the XML world with all its
features while still ensuring backward and future compatibility of the content. The XHTML
family includes three document types; the first is XHTML 1.0, which was recommended by
W3C on January 26, 2000. The second is XHTML 1.1, which was recommended by W3C on
May 31, 2001.
The third is XHTML5, a standard used for developing an XML adaptation of the HTML5
specification. An XHTML document must have an XHTML <!DOCTYPE> declaration.
Elements of XHTML:
When creating an XHTML web page, it is necessary to include a DTD (Document Type
Definition) declaration. There are three types of DTD which are discussed below:
Transitional DTD:
It is supported by the older browsers which do not have inbuilt cascading style sheets supports.
Several attributes are enclosed in the body tag which are not allowed in strict DTD.
Syntax:
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
Example:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-
transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Transitional DTD XHTML</title>
</head>
<body bgcolor="#dae1ed">
<div style="color:#090;font-size:40px;
font-weight:bold;text-align:center;
margin-bottom:-25px;">GeeksforGeeks</div>
<p style="text-align:center;font-size:20px;">
A computer science portal</p>
<p style="text-align:center;font-size:20px;">
Option to choose month:
<select name="month">
<option selected="selected">January</option>
<option>February</option>
<option>March</option>
<option>April</option>
<option>May</option>
<option>June</option>
<option>July</option>
<option>Augusy</option>
<option>September</option>
<option>October</option>
<option>November</option>
<option>December</option>
</select>
</p>
</body>
</html>
Strict DTD:
Strict DTD is used when XHTML page contains only markup language. Strict DTD is used
together with cascading style sheets, because this attribute does not allow CSS property in
body tag.
Syntax:
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
Example
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-
strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Strict DTD XHTML</title>
</head>
<body>
<div style="color:#090;font-size:40px;
font-weight:bold;text-align:center;
margin-bottom:-25px;">GeeksforGeeks</div>
<p style="text-align:center;font-size:20px;">
A computer science portal</p>
<p style="text-align:center;font-size:20px;">
Option to choose month:
<select name="month">
<option selected="selected">January</option>
<option>February</option>
<option>March</option>
<option>April</option>
<option>May</option>
<option>June</option>
<option>July</option>
<option>Augusy</option>
<option>September</option>
<option>October</option>
<option>November</option>
<option>December</option>
</select>
</p>
</body>
</html>
Frameset DTD:
The frameset DTD is used when XHTML page contains frames. This DTD is identical to the
HTML 4.01 Transitional DTD except for the content model of the HTML element.
Syntax:
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
Example
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xml:lang="en" lang="en">
<head>
<title>Frameset DTD XHTML</title>
</head>
<frameset cols="30%, 20%, *">
<frameset rows="40%, 30%, *">
<frame src="gfg.html" />
<frame src="gfg1.html" />
<frame src="geeks.html" />
</frameset>
<frameset rows="40%, 60%">
<frame src="g4g.html" />
<frame src="g4g1.html" />
</frameset>
<frameset rows="20%, 20%, 30%, *">
<frame src="geeksforgeeks.html" />
<frame src="geeksforgeeks1.html" />
<frame src="geeksforgeeks2.html" />
<frame src="geeksforgeeks3.html" />
</frameset>
</frameset>
</html>
HTML XHTML