Components of a Web Application

Components of a Web Application

A web application starts with an HTTP request, which the browser performs when you go to a URL. The response to this request is an HTML document:

<!DOCTYPE html>
<html>
    <head>
        ... meta information about the page here ...
        ... next line loads a CSS file ...
        <link rel="stylesheet" type="text/css" href="aFilename.css">
    </head>
    <body>
        ... content ...
        <script type="text/javascript">
           ... javascript code can go here ...
        </script>
        <script src="aFilename.js"></script>  ... This line loads a Javascript file.
    </body>
</html>

There are essentially 3 components to every page:

Structure
What elements there are in the page and how they relate to each other. This is indicated by the HTML tags in this document.
Appearance
How the elements look. This is indicated by information in the CSS file linked via the link tag.
Behavior
How the elements react to user interaction. This is determined by the Javascript code provided via the script tags.

Working with the Elements tag in Chrome