why java and not HTML....?

Can neone please tell me Why we use Java Programming to develop sites .....instead of html which is easy to use. Is it just the matter of security...?
[157 byte] By [Black.Javaa] at [2007-11-27 5:32:04]
# 1
HTML is not a programming language. It's simply markup--presentation.
jverda at 2007-7-12 14:57:51 > top of Java-index,Java Essentials,New To Java...
# 2
Well, you can't really compare the two because they're two different languages. While java and html do go together (thanks to the JVM), they were both designed for entirely different purposes.
angryfirelorda at 2007-7-12 14:57:51 > top of Java-index,Java Essentials,New To Java...
# 3
but why we use GUI of java if there is well defined mechanism in html to create buttons etc......without handling different events....(like mouseclick event)
Black.Javaa at 2007-7-12 14:57:51 > top of Java-index,Java Essentials,New To Java...
# 4
> Well, you can't really compare the two because> they're two different languages. While java and html> do go together (thanks to the JVM), No, the JVM has nothing to do with Java and HTML "going together."
jverda at 2007-7-12 14:57:51 > top of Java-index,Java Essentials,New To Java...
# 5
m still confused....why cant we call html a prog. language...if we can do anything in it whatever we do in java.....?
Black.Javaa at 2007-7-12 14:57:51 > top of Java-index,Java Essentials,New To Java...
# 6

That's like asking why use linoleum when we could use carpet instead.

HTML is good for presentation of certain types of things. It also makes creating simple forms easy. But there are some types of UI's that, while you could likely create them with DHTML, they are very complex and probably a real pain to support. Nevermind that there are still browser inconsistencies to deal with.

Java is a totally different tool. In fact Java can do a whole heck of a lot more than UI's. Java can even be used on the server to help generate HTML output.

Java can work with HTML in various ways. Sometimes Java's the right tool, sometimes HTML is the right tool. Use the right tool.

bsampieria at 2007-7-12 14:57:51 > top of Java-index,Java Essentials,New To Java...
# 7
> .if we can do anything in it whatever we do> in java.....?We can't.How do you write a loop in HTML?
jverda at 2007-7-12 14:57:51 > top of Java-index,Java Essentials,New To Java...
# 8

> m still confused....why cant we call html a prog.

> language...if we can do anything in it whatever we do

> in java.....?

You can't do in HTML whatever you can do in Java. Whoever told you that is taking a very narrow, limited view on them.

HTML is not a programing language because it's not by definition. It's a simple markup language that provides a browser with instructions on how to display stuff.

bsampieria at 2007-7-12 14:57:51 > top of Java-index,Java Essentials,New To Java...
# 9
> How do you write a loop in HTML?<img src="./loop.png" alt="loop" width="150" height="150" />
bsampieria at 2007-7-12 14:57:51 > top of Java-index,Java Essentials,New To Java...
# 10

[nobr]> How do you write a loop in HTML?

<html>

<head>

<meta http-equiv="refresh" content="1">

</head>

<body>

<a href="#" onclick="javascript:window.location.reload();">

How do you keep a dummy busy?

</a><br/>

Wait one second, please...

</body>

</html>

[/nobr]

kevjavaa at 2007-7-12 14:57:51 > top of Java-index,Java Essentials,New To Java...
# 11
Are you possibly talking about Javascript? Not that the question makes much more sense with that replacement.
DavidKNa at 2007-7-12 14:57:51 > top of Java-index,Java Essentials,New To Java...
# 12
> Are you possibly talking about Javascript? Not that> the question makes much more sense with that> replacement.Thats what I thought also.
_helloWorld_a at 2007-7-12 14:57:51 > top of Java-index,Java Essentials,New To Java...
# 13
Enough of this, how about some real questions:Is HTML 100% object-oriented?Does it support pass-by-reference?Is it faster than C++?Enquiring minds want to know. Or should I say minds with doubts?
ejpa at 2007-7-12 14:57:51 > top of Java-index,Java Essentials,New To Java...