html - commentary.

dos2unix

Well-Known Member
Joined
May 3, 2019
Messages
3,060
Reaction score
2,789
Credits
26,634
In the early days of the internet, we had something called flat html.

Here is an example.

Code:
<!DOCTYPE html>
<html>
<head>
    <title>Hello, World!</title>
</head>
<body>
    <h1>Hello, World!</h1>
</body>
</html>

But now a days we we have the "new and improved" html, that takes 10 times as long to write, and takes up ten times as much space.

Code:
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Hello, World!</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css">
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
    <link rel="stylesheet" href="styles.css">
    <style>
        body {
            background-color: #f0f0f0;
        }
        .container {
            margin-top: 50px;
            text-align: center;
        }
        .hello-world {
            font-family: 'Comic Sans MS', cursive, sans-serif;
            color: #ff6347;
            text-shadow: 2px 2px #000000;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="row">
            <div class="col-md-12">
                <h1 class="hello-world">Hello, World!</h1>
            </div>
        </div>
    </div>
    <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
    <script src="script.js"></script>
    <script>
        $(document).ready(function() {
            console.log('Hello, World!');
        });
    </script>
</body>
</html>

Now obviously I'm exaggerating a little here with some obvious overkill, but it's not that far off.
I'm not sure I see much advantage in the "new way" of doing it.
 
Last edited:


You can still use the earliest versions of HTML if you'd like. A browser is going to support that just fine.

We use newer versions of HTML because we can do more. We've also changed the process.

HTML is for content and structure. CSS is for design and layout. Scripting languages are for adding features, like JavaScript libraries and PHP for dynamic content or advanced 'programming'.

(Calling PHP a programming language will get grumpy replies in some spheres and I'm not sure that they're technically correct. It is a scripting language and isn't compiled.)

But, yeah... You can do a whole lot more in HTML5 than you'd have ever dreamed of with HTML 1.0. Most sites don't take advantage of this. I'd even go so far as to say most sites don't need to take advantage of this.

But... You can, which is nice...

Also, WebAssembly has so much awesome potential. It's a shame that I can't think of anything I personally want to do with it.

The days of simply HTML are pretty much over because people want more out of their web browsing experiences. People expect more, as a general rule. (That's most people, which may not apply to you or others who really don't need the cruft when searching for information.)

Me? I don't much mind BUT I do want my data presented to me in an information-dense format if I'm researching something. I've got a big monitor. Fill it with information when I'm actively researching something, reading a mathematics journal, looking for technical information, or things like that...
 


Top