Let me outline the topic:
- HTML is what we send to the browser and should be the CONTENT only which can be created anyway you please and then add the HTML tags to create the various parts of what the browser sees; eg head, body, title, paragraphs.
- CSS is the PRESENTATION and layout control; which fonts, colors, and locations for specific paragraphs or even just words. Once the HTML is available, we just add class="xyz" to an element to make it behave to the css by that name
- The Javascript stuff is for special controls inside the browser, usually related to controlling FORMS. This is also known as Dynamic HTML (as you can also create html on-the-fly).
These are the interface to the webserver CGI processing and it saves the user a lot of pain if the required fields are verified in the browser instead of going round trip to only get back 'field xxx is required'. You can also ensure that field2 is correct for the value provided in field1
Here's some fun;
1) use the browser Save AS ... and set the format to "text with line breaks" and name the file whatever.txt
That file will contain ONLY the text of every paragraph. You can then play with adding html tags and SAVE AS using whatever.html and your browser can present your edited file.
2) create a CSS file whatever.css and and add
Code:
<link rel="stylesheet" type="text/css" href="./whatever.css" media="all" />
inside your < head > < / head > section of html
and you can test without a webserver directly on your PC