kingashu Posted March 9, 2012 Posted March 9, 2012 guys what is the difference between html and javascript, i find both of them similar in may regards
Schrödinger's hat Posted March 9, 2012 Posted March 9, 2012 (edited) guys what is the difference between html and javascript, i find both of them similar in may regards They are very different languages. HTML looks like this: <HTML> <head> Blah blah </head> <body> <p>Some stuff</p> </body> </HTML> [code] And so on. Javascript looks like this [code] var i, ham; ham = function(a,b,c) { for(var i = 0,ii =a; i<ii; i++) { b[i] = {Fish: c*i}; } }; You often see javascript embedded in an HTML file (inside <script> tags). You also frequently see bits of html in the javascript code, as its main use is building webpages. Edited March 9, 2012 by Schrödinger's hat
khaled Posted March 9, 2012 Posted March 9, 2012 (edited) guys what is the difference between html and javascript, i find both of them similar in may regards HTML is a markup language that is used to build web pages for internet clients, Java Script is a Client-side script in HTML you design how the web page looks like to the client in Java Script you can do some simple programming .. and you can use both inside HTML page, like this example: <html> <head> <title>HTML\Java Script Example</title> <script> // Java Script Code var Hi = function ( ) { return "Hi" ; }; </script> </head> <body> <p> <script> document.write( Hi ( ) ) ; </script> </p> </body> </html> Edited March 9, 2012 by khaled
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now