Unit 3 Dhtml Xhtml
Unit 3 Dhtml Xhtml
• It is used for designing the animated and interactive web pages that are
developed in real-time.
• DHTML helps users by animating the text and images in their
documents.
• It allows the authors for adding the effects on their pages.
• It also allows the page authors for including the drop-down menus or
rollover buttons.
• This term is also used to create various browser-based action games.
• It is also used to add the ticker on various websites, which needs to
refresh their content automatically.
<HTML>
<head>
<title>
Method of a JavaScript
</title>
</head>
<body>
<script type="text/javascript">
document.write("JavaTpoint");
</script>
</body>
</html>
<html> <body bgcolor="orange">
<head> <font size="4" color="blue">
<center> <p>
<title>
Click here # <a href="#"
DHTML with JavaScript onClick="dateandtime();">
</title> Date and Time </a>
<script type="text/javascript"> # to check the today's date and
function dateandtime() time.
{ </p> </center>
alert(Date()); </font>
</body>
}
</html>
</script>
</head>
XML
• XML (Extensible Markup Language) is a markup language similar to
HTML, but without predefined tags to use.
• This is a powerful way to store data in a format that can be stored,
searched, and shared.
<?xml>
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
• The XML language has no predefined tags.
• The tags in the example above (like <to> and <from>) are not defined
in any XML standard. These tags are "invented" by the author of the
XML document.
• HTML works with predefined tags like <p>, <h1>, <table>, etc.
• With XML, the author must define both the tags and the document
structure.
<?xml>
<bookstore>
<book category="cooking">
<title lang="en">Everyday Italian</title>
<author>Giada De Laurentiis</author>
<year>2005</year>
<price>30.00</price>
</book>
<book category="children">
<title lang="en">Harry Potter</title>
<author>J K. Rowling</author>
<year>2005</year>
<price>29.99</price>
</book>
<book category="web">
<title lang="en">XQuery Kick Start</title>
<author>James McGovern</author>
<author>Per Bothner</author>
<author>Kurt Cagle</author>
<author>James Linn</author>
<author>Vaidyanathan Nagarajan</author>
<year>2003</year>
<price>49.99</price>
</book>
</bookstore>