+ 2
Relationship between JavaScript and HTML
This might seem dumb. But trying to understand how pieces fit, is it normal to have the HTML code be the "default" display of text for a webpage, and then the JavaScript handle divergences that come later, or am I missing something? Also, stupid question. But when I learned html in HS, we learned <center>. But CSS can handle that too. So in which apparatus is it considered "better" to handle that in?
5 Antworten
+ 3
Rachel
HTML as per the name HYPER TEXT MARKUP LANGUAGE is used to design the markup or structure of the webpage.
It is perfectly normal to use HTML for displaying text or other media and javascript handle the divergence or interactivity in the web page.
Further, center tag was used in HTML4 and now it is not supported in HTML5.
+ 3
They are just friends.
Understand it like this:
HTML is bones and whole skeleton,
CSS is skin and makeup,
Javascript is Brain & Muscle
of a website.
+ 3
It would be better if you use CSS3 for styling purposes, HTML only for structure and offcourse javascript for animating/activities.
0
HTML is a markup language designs webpage
CSS is a stylesheet styles the webpage
JAVASCRIPT is a scripting language validates webpage
0
<center> is old and deprecated. Don't use it anymore. The css way is the correct way. Also, javascript is only for logic purposes, since html is static and can't change. Javascript runs in your browser, so you can use it to manipulate your static html and create some functionality.