HTML : HTML is not a programming language instead, it is a markup language. It is used to create web pages (web designing). It is not possible to create complex applications with HTML. However, you can create basic apps like an application full of static pages etc. with it. HTML has a defenite number of tags/codes for different functionalities like 'b' tag for bold text, 'u' for underline text etc. It doesn't needs logics, therefore it is very easy to learn. I suggest you to learn it first.
Java : Java is a powerful programming language. You can create complex apps through it. With Java, you can create apps for Android, Windows, other OSes and devices. You can also create web based apps with the help of Java. It is completey based on logics, therefore, it needs more focus and brainstorming to understand.
stand alone applications which you can run in your desktop by installing the application
web based application which you can get through web browser url
In web based applications only, html comes to play, its used to create user interfaces in web applications -view part, and programming languages like java etc you can use to build /run logic behind the user view.
In modern web application development,not only html other scripting languages ,css are used to create user view an user experience rather than just user interfaces.