Mario Margjini Posted July 7, 2019 Share Posted July 7, 2019 Hey guys! Im new at this forum, and as my first question i got is how similar are java script and html. I want to know everything about javascript-html as together. Thank you!... Link to comment Share on other sites More sharing options...
Funce Posted July 8, 2019 Share Posted July 8, 2019 Hey there, Welcome to the forum! HTML and JavaScript are about as different as a potato and a knife. HTML are the building blocks of most web pages (Unsure if there is one that isn't), and uses CSS to style the HTML into a pleasing format. JavaScript in its most basic form creates interactivity and flexibility with HTML and CSS. Yeah so HTML is your structure, CSS is your design, and JS makes it work. Query data, move objects around the page, change CSS, change HTML. Have a look at the JavaScript tutorial for more information surrounding it! https://www.w3schools.com/js/ JS HTML DOM tutorial will show you more about the interactivity, and how JS can meld your HTML. https://www.w3schools.com/js/js_htmldom.asp Link to comment Share on other sites More sharing options...
dsonesuk Posted July 8, 2019 Share Posted July 8, 2019 Potato and knife? Banana and fork? Apple and spoon? Or maybe chalk and cheese. 😁 1 Link to comment Share on other sites More sharing options...
Funce Posted July 8, 2019 Share Posted July 8, 2019 13 hours ago, dsonesuk said: Potato and knife? Banana and fork? Apple and spoon? Or maybe chalk and cheese. 😁 I was trying to be somewhat clever, but I thought a potato and a peeler was too on the nose. Haha Link to comment Share on other sites More sharing options...
ishan_shah Posted July 26, 2019 Share Posted July 26, 2019 Hello, JavaScript can be used to change the HTML content as well as mostly used for the validations of the input types. you can apply JavaScript in two ways. Either internal or externally. When you write your JS code in between <script>, then it is called Internal JavaScript. E.x. <script> function myFunction() { document.getElementById("demo").innerHTML = "Paragraph changed."; } </script> When you write your JS code in a separate file and then give its path to src attribute in <script>, then it is called External JavaScript. E.x. Your Js File: function myFunction() { document.getElementById("demo").innerHTML = "Paragraph changed."; } <script src="script.js"></script> Link to comment Share on other sites More sharing options...
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