Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 10

Difference between HTML and HTML 5:

Sr no. HTML HTML5

1. It didn’t support audio and video without the use of flash player support. It supports audio and video controls with the use of <audio> and
<video> tags.

2. It uses cookies to store temporary data. It uses SQL databases and application cache to store offline data.

3. Does not allow JavaScript to run in the browser. Allows JavaScript to run in the background.

4. Vector graphics are possible in HTML with the help of various technologies Vector graphics are additionally an integral part of HTML5 like SVG
such as VML, Silver-light, Flash, etc. and Canvas.

5. It does not allow drag and drop effects. It allows drag and drop effects.

6. Not possible to draw shapes like circle, rectangle, triangle etc. HTML5 allows to draw shapes like circle, rectangle, triangle etc.

7. It works with all old browsers. It supported by all new browser like Firefox, Mozilla, Chrome,
Safari, etc.

8. <HTML>, <Body>, and <Head> tags are mandatory while writing a HTML These tags can be omitted while writing HTML code.
code.

9. Older versions of HTML are less mobile-friendly. HTML5 language is more mobile-friendly.

10. Doctype declaration is too long and complicated. Doctype declaration is quite simple and easy.

11. Elements like nav, header was not present. New element for web structure like nav, header, footer etc.

12. Character encoding is long and complicated. Character encoding is simple and easy.

13. It is almost impossible to get true GeoLocation of user with the help of One can track the GeoLocation of a user easily by using JS
browser. GeoLocation API.

14. It cannot handle inaccurate syntax. It is capable of handling inaccurate syntax.

15. Being an older version, it is not fast , flexible , and efficient as compared to It is efficient, flexible and more fast in comparison to HTML.
HTML5.
16. Attributes like charset, async and ping are absent Attributes of charset, async and ping are a part

Element In HTML5

<applet> Changed to <object>

<acronym> Changed to <abbr>

<dir> Changed to <ul>

<frameset> Removed

<frame> Removed

<noframes> Removed

<strike> No new tag. CSS is used for this

<big> No new tag. CSS is used for this

<basefont> No new tag. CSS is used for this

<font> No new tag. CSS is used for this

<center> No new tag. CSS is used for this

<tt> No new tag. CSS is used for this

Difference between CSS and CSS3:

S.No. CSS CSS3

CSS3 is capable of making the web page more attractive

1 CSS is capable of positioning texts and objects. CSS3 is backward compatible with CSS.
2 Responsive designing is not supported in CSS it supports responsive design.

3 CSS cannot be split into modules. can be breakdown into modules.

4 we cannot build 3D animation and transformation. it supports animation and 3D transformations.

5 CSS is very slow as compared to CSS3 Whereas CSS3 is faster than CSS.

6 it uses basic color schemes only. has a good collection of HSL RGBA, HSLA colors.

7 In CSS we can only use single text blocks. But in CSS3 we can use multi-column text blocks

8 CSS does not support media queries. But CSS3 supports media queries

9 CSS codes are not supported by all types of modern browsers. CSS3 codes are supported by all modern browsers.

10 designers have to manually develop rounded gradients and corners. But CSS3 provides advanced codes for setting rounded gradients and corners

In CSS, the user can add background colors to list items and lists, set Whereas CSS3 list has a special display property defined in it. Even list items also
12 images for the list items, etc. have counter reset properties.

13 CSS was developed in 1996. CSS3 is the latest version of CSS and was released in 2005.

14 CSS is memory intensive. CSS3 memory consumption is low as compared to CSS.

Certainly! Let’s delve into the distinctions between HTML, XHTML, and DHTML:
1. HTML (Hyper Text Markup Language):

o HTML is a markup language used for creating web applications and websites.

o Its primary purpose is to create static web pages.

o HTML is mainly employed in front-end development and is not used for back-end functionalities like data exchange.

o Example HTML snippet:

o <!DOCTYPE html>

o <html>

o <head>

o <title>HTML Syntax</title>

o </head>

o <body>

o <h2>GFG is best.</h2>

o <hr>

o <p><b>Learn anything from GFG</b></p>

o </body>

o </html>

2. XHTML (Extensible Hyper Text Markup Language):

o XHTML combines features from both HTML and XML.

o It inherits all HTML tags and properties but enforces stricter rules, such as proper opening and closing of tags, case sensitivity, and error
checking.

o Although it’s a good language, developers haven’t shown as much interest in it as they have in HTML.
o Example XHTML snippet:

o <!DOCTYPE html>

o <html xmlns="XML namespace">

o <head>

o <title>XHTML Syntax</title>

o </head>

o <body>

o <hr />

o <h2>GFG is best</h2>

o <p>Learn anything from GFG</p>

o </body>

o </html>

o Note that in XHTML, the <p> tag is explicitly closed, whereas in HTML, it’s not necessary.

3. DHTML (Dynamic Hyper Text Markup Language):

o DHTML was created to add interactivity to web pages, as HTML alone could only create static pages.

o Users prefer interactive web pages with features like style changes on clicking or hovering.

o DHTML allows responses to user input without involving a web server.

o Example DHTML snippet:

o <!DOCTYPE html>

o <html>

o <head>
o <title>DHTML Syntax</title>

o </head>

o <body>

o <hr />

o <h2>GFG is best</h2>

o <br />

o <script type="text/javascript">

o document.write("Learn anything from GFG");

o </script>

o </body>

o </html>

In summary:

 HTML constructs web pages.

 XHTML is an advanced version of HTML based on XML.

 DHTML combines various technologies for interactive web development12. 🌐


Extensible Markup Language (XML) is a type of markup language that establishes a set of guidelines for encoding texts in a way that is both machine- and
human-readable. For storing and transferring data on the web and in many other applications, XML is widely used. XML steps in as a versatile tool for encoding
and organizing data in a way that both humans and machines can comprehend.

History of XML

XML emerged in the late 1990s as a revolutionary concept in the evolving landscape of the internet. Before XML, HTML served as the predominant language for
web content, but it lacked the flexibility needed for complex data representation. XML arrived as a solution, offering a standardized format for expressing
diverse types of data in a hierarchical structure.

Different ways of using XML

In the realm of XML, everything revolves around tags. Think of tags as containers that hold different pieces of information. Each tag has a name and can
optionally carry attributes, providing additional details about the enclosed data. Here’s a simple breakdown:

<element attribute="value">Text content</element>

Let’s unpack this: <element> represents the name of the container, attribute is like a label describing the container’s contents, and Text content is the actual
information stored within the container.

Simple XML Document

<book> acts as the main container, housing details about a book such as its title, author, and publication year.

Example:

<book>
<title>Harry Potter and the Sorcerer's Stone</title>
<author>J.K. Rowling</author>
<year>1997</year>
</book>

XML with Attributes

Here, <student> serves as the container for student information, with attributes like id providing additional identifiers.

Example:

<student id="001">
<name>John Doe</name>
<age>25</age>
<grade>A</grade>
</student>

Example: the <book> element serves as the primary container, encompassing information pertaining to a book such as its title, author, and year of publication.

XML

<book>

<title>Harry Potter and the Sorcerer's Stone</title>

<author>J.K. Rowling</author>

<year>1997</year>

</book>

Output:

Applications of XML

 In the world of web development, XML serves as a handy tool for sorting and moving data around. It’s like the organizer of the digital world, helping to
structure everything from news feeds to website maps and setup files. And when it comes to web services like SOAP, XML plays a crucial role in enabling
different systems to share information seamlessly over the internet.
 When it comes to exchanging data between different computer systems, XML acts as a kind of universal translator. It bridges the gap between systems
that speak different languages, making it possible for businesses and organizations to communicate effectively, even if their software systems don’t
normally understand each other.

 Think of XML as a digital filing cabinet for managing documents. It’s used across industries like publishing, healthcare, and law to store and organize
documents in a way that’s easy to find and manage. Whether it’s technical manuals or legal documents, XML-based standards like DocBook and DITA
provide a structured framework for storing important information.

 Imagine XML as the settings menu of your favorite app. It’s the behind-the-scenes tool that developers use to create organized lists of options and
preferences for users to customize their experience. With XML, you can tweak your app settings without needing to know the ins and outs of coding.

 XML is like a shared language between computers and humans. It’s perfect for storing data in databases because it provides a clear and structured way
to organize information. And with tools like XML Schema Definition (XSD), you can ensure that your data follows specific rules and formats, making it
easier to work with.

 In the world of software integration, XML plays the role of a mediator between different systems. It helps bridge the gap between apps that speak
different “languages,” allowing them to communicate and share information seamlessly. This makes it easier for businesses to streamline their
operations by connecting all their software systems together.

 And finally, XML has inspired popular data formats like JSON and YAML. These simplified versions of XML are easier for computers to read and write,
making them perfect for exchanging data between applications and services. They’re the modern-day equivalents of XML, designed to make data
interchange faster and more efficient.

Advantages of XML

 Human-readable: XML’s straightforward tag-based syntax makes it easy for humans to read and understand. This readability promotes collaboration and
understanding among developers and other stakeholders.

 Interoperability: Like a skilled interpreter, XML bridges the communication gap between disparate systems, enabling seamless data exchange. Whether
it’s sharing data between different applications or integrating systems from different vendors, XML ensures interoperability and compatibility.

 Flexibility: XML’s adaptability allows it to handle a wide range of data types and structures, offering a canvas for expressing diverse information.
Whether it’s simple text data, complex hierarchical data, or metadata describing data relationships, XML can accommodate it all.

Limitations of XML

 Verbosity: XML can sometimes be verbose, resembling a verbose storyteller who takes longer to convey information, leading to larger file sizes. This
verbosity can impact performance and increase bandwidth usage, especially in scenarios with large datasets or frequent data exchange.
 Complexity: Managing namespaces, schemas, and other XML-related concepts can add layers of complexity, akin to navigating through a maze of rules
and conventions. This complexity can be daunting for newcomers and may require additional training and expertise to handle effectively.

 Parsing Overhead: Par

You might also like