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

CAP UNIT-2-1 HTMP and XML Notes

Uploaded by

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

CAP UNIT-2-1 HTMP and XML Notes

Uploaded by

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

UNIT –II Web technologies

HTML,XML,CSS,Programming languages,Introduction to web servers and Server Products,


Introduction to databases,MYSQL,MS-ACCESS,Pharmacy Drug database

HTML
HTML (Hypertext Markup Language) is the standard markup language used for creating and
structuring web pages. It forms the foundation of the World Wide Web and is essential for
building websites and web applications. HTML uses a set of markup tags to define the structure
and content of a webpage, allowing browsers to interpret and display the information correctly.

HTML stands for Hyper Text Markup Language. It is used to design web pages using markup
language. HTML is the combination of Hypertext and Markup language. Hypertext defines the
link between the web pages. Markup language is used to define the text document within tag
which defines the structure of web pages.

This language is used to annotate (make notes for the computer) text so that a machine can
understand it and manipulate text accordingly. Most of markup (e.g. HTML) languages are
human readable. Language uses tags to define what manipulation has to be done on the text.
HTML is a markup language which is used by the browser to manipulate text, images and other
content to display it in 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 which was published in 1999.HTML is the
standard markup language for creating Web pages.

Introduction to HTML:

1. HTML Document Structure: An HTML document consists of a set of elements


enclosed within opening and closing tags. The basic structure of an HTML document includes
the DOCTYPE declaration, the opening and closing HTML tags, and the head and body sections.
2. Tags and Elements: HTML tags define the elements within a webpage. They are written
as opening tags enclosed in angle brackets (<>) and closing tags preceded by a forward slash (/)
and enclosed in angle brackets. Elements can contain text, other elements, or both.
3. Head Section: The head section of an HTML document contains metadata about the
webpage, such as the title, character encoding, linked stylesheets, scripts, and other information
that doesn’t appear directly on the page.
4. Body Section: The body section contains the visible content of the webpage, including
text, images, links, tables, forms, and other elements. This is where the main content of the
webpage is defined.
5. Text Formatting: HTML provides various tags to format text, such as headings (h1 to
h6), paragraphs (p), bold (strong), italic (em), underline (u), lists (ul, ol, li), and more. These tags
help structure and style the content.
6. Links and URLs: HTML allows you to create hyperlinks to link different webpages or
external resources. The anchor tag (<a>) is used to define a link, and the href attribute specifies
the URL of the target page or resource.
7. Images: HTML enables you to include images in webpages using the img tag. The src
attribute is used to specify the image file URL, and you can provide alternative text using the alt
attribute for accessibility purposes.
8. Tables: HTML tables allow you to organize data into rows and columns. The table tag ()
defines the table structure, and the tr (table row) and td (table data) tags define the rows and
cells, respectively.
9. Forms: HTML forms are used to collect user input, such as text, checkboxes, radio
buttons, dropdown menus, and buttons. The form tag () encapsulates the form elements, and the
action attribute specifies the URL where the form data is sent.
10. Semantic HTML: HTML5 introduced semantic elements that provide meaning and
structure to the content, making it more accessible and search engine-friendly. Examples include
header, nav, main, article, section, aside, footer, and more.

Structure of HTML:
Example-1: Working of HTML
<html>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>

Example-2: Create an HTML web page to show personal information


<html>
<head>
<title>page of personal Information </title>
</head>
<body>
<B><font size=5><center>personal Information </center></font></B><br>
<table border =1 align =center cellspacing=5 cellpadding=5>
<tr>
<td>
<img src=” Libraries\Pictures.jpg” Align =”top” Width=75 height=75/>
</td>
<td><B>Name:</B>J. Asmitha Lisma<br>
<B>Email:</B>asmi.com<br>
<B>contact:</B>8148064828
</B></td>
<td>
<B>permanent Adress:</B> Flat No-302,<br>Jai Aranvilai, Manavalakurichi,<br>
Kanyakumari-629251
</td>
</tr>
<tr>
<td colspan=3>
<hr color= brown></center>
<B>Objective </B>
<center><hr color=brown> To be associated with a progressive organization which poses a
challenging and innovative career , my knowledge and thus giving me scope to update my
knowledge and skill.</center>
</td>
</tr>
<tr>
<td colspan=3>
<hr color=brown>
<B>Education Profile </B>
<hr color=brown>
<table cellspacing=5 cellpadding=5 border=2>
<tr>
<td>Exam</td>
<td>Board /University</td>
<td>Institution</td>
<td>Year </td>
<td>Percentage</td>
</tr>
<tr>
<td>B.pharm.</td>
<td>Dr M G R medical university, chennai</td>
<td>S .A Raja pharmacy College, Vadakangulam.</td>
<td>2017-2021</td>
<td>98.9%</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan=3>
<hr color=brown></center>
<B>Decleration</B>
<hr color =brown>I hereby declare that the above written particulars are true to the best of my
knowledge and belief.<BR>
Date:<BR> Place:
</td>
</td>
</tr>
</table>
<Br>
<Marquee><font color=red><B></td> © Copyrights reserved
</B></font></Marquee>
</html>

OUTPUT:
Features of HTML:
 It is easy to learn and easy to use.
 It is platform independent.
 Images, video and audio can be added to a web page.
 Hypertext can be added to text.
 It is a markup language.

Why learn HTML?


 It is a simple markup language. Its implementation is easy.
 It is used to create a website.
 Helps in developing fundamentals about web programming.
 Boost professional career.

Advantages:
 HTML is used to build a websites.
 It is supported by all browsers.
 It can be integrated with other languages like CSS, JavaScript etc.

Disadvantages:
 HTML can create only static webpages so for dynamic web page other languages have to be
used.
 Large amount of code has to be written to create a simple web page.
 Security feature is not good.

Introduction to XML
XML (eXtensible Markup Language) is a widely used markup language designed to store and
transport structured data. It provides a flexible and self-describing format for representing
information in a machine-readable and human-readable manner.

XML was developed by the World Wide Web Consortium (W3C) as a standard for exchanging
data between different systems and platforms.

 XML stands for eXtensible Markup Language


 XML is a markup language much like HTML
 XML was designed to store and transport data
 XML was designed to be self-descriptive
 XML is a W3C Recommendation

Here are some key aspects of XML:

1. Markup Language: XML uses tags to define elements and structure data. It allows users
to define their own tags, making it highly flexible and extensible. Tags are enclosed in angle
brackets (<>) and can be nested to create a hierarchical structure.
2. Self-Describing: XML documents are self-describing, meaning they contain both the
data and the metadata that describes the structure and meaning of the data. This makes it easier
for applications to interpret and process the information.
3. Hierarchical Structure: XML documents have a hierarchical structure, organized in a
tree-like fashion. Elements can have parent-child relationships, forming a tree structure where
elements can contain other elements or data.
4. Tags and Elements: Tags represent the markup structure in XML. They define the
beginning and end of an element and give it a name. Elements can have attributes, which provide
additional information about the element. The data or content within an element is enclosed
between the opening and closing tags.
5. Attributes: Attributes provide additional information about elements. They consist of a
name-value pair and are specified within the opening tag of an element. Attributes are useful for
providing metadata or additional details about the elements.
6. Well-Formedness and Validity: XML documents must adhere to certain rules to be
considered well-formed. This includes having a single root element, properly nested elements,
and correctly closed tags. Additionally, XML can have a Document Type Definition (DTD) or
XML Schema to define the structure and validate the document against a specific set of rules.
7. Data Exchange: XML is commonly used for data exchange between different systems or
applications. It provides a standardized format that can be easily parsed and processed by various
programming languages and platforms.
8. Extensibility: XML allows users to define their own tags and structure, making it highly
extensible. This flexibility enables customization and adaptation to specific data requirements.

Structure of XML:

<?xml version = "1.0"?>


<contactinfo>
<address category = "college">
<name>G4G</name>
<College>Geeksforgeeks</College>
<mobile>2345456767</mobile>
</address>
</contactinfo>

Advantages of XML
1. XML is platform independent and programming language independent, thus it can be used on
any system and supports the technology change when that happens.
2. XML supports unicode. Unicode is an international encoding standard for use with different
languages and scripts, by which each letter, digit, or symbol is assigned a unique numeric value
that applies across different platforms and programs. This feature allows XML to transmit any
information written in any human language.
3. The data stored and transported using XML can be changed at any point of time without
affecting the data presentation. Generally other markup language such as HTML is used for data
presentation, HTML gets the data from XML and display it on the GUI (graphical user
interface), once data is updated in XML, it does reflect in HTML without making any change in
HTML GUI.
4. XML allows validation using DTD and Schema. This validation ensures that the XML
document is free from any syntax error.
5. XML simplifies data sharing between various systems because of its platform independent
nature. XML data doesn’t require any conversion when transferred between different systems.

Disadvantages of XML
1. XML syntax is verbose and redundant compared to other text-based data transmission formats
such as JSON.
2. The redundancy in syntax of XML causes higher storage and transportation cost when the
volume of data is large.
3. XML document is less readable compared to other text-based data transmission formats such
as JSON.
4. XML doesn’t support array.
5. XML file sizes are usually very large due to its verbose nature, it is totally dependant on who
is writing it.

Difference between HTML and XML

XML HTML

The full form is eXtensible Markup Language The full form is Hypertext Markup Language

The main purpose is to focus on the transport Focusses on the appearance of data. Enhances the
of data and saving the data appearance of text

XML is dynamic because it is used in the HTML is static because its main function is in the
transport of data display of data

It is case-sensitive. The upper and lower case It is not case-sensitive. Upper and lower case are of not
needs to be kept in mind while coding much importance in HTML

You can define tags as per your requirement, It has its own pre-defined tags, and it is not necessary
but closing tags are mandatory to have closing tags

XML can preserve white spaces White spaces are not preserved in HTML

eXtensible Markup Language is content- Hypertext Markup Language, on the other hand, is
driven, and not many formatting features are presentation driven. How the text appears is of utmost
available importance
Any error in the code shall not give the final Small errors in the coding can be ignored and the
outcome outcome can be achieved

The size of the document may be large No lengthy documents. Only the syntax needs to be
added for best-formatted output

You might also like