I want to know what you all think about strongly-annotated HTML?
Let me know!
What is strongly-annotated HTML?
Strongly-annotated HTML is where you don't leave any optional attributes unset, even if they have a default value.
E.g.
<!DOCTYPE html>
<html lang="en-US" dir="ltr">
<head>
<title>Hello!</title>
<style language="css" type="text/css">
/* ... */
</style>
<link href="./icon.png" type="image/png" rel="icon"/>
<link language="css" href="./_.css" type="text/css" rel="stylesheet"/>
</head>
<body>
<p>Hello World!</p>
<img type="image/png" alt="An image of Katty." src="./katty.png"/>
</body>
</html>
An example of non-annotated HTML:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Hello!</title>
<style>
/* ... */
</style>
<link href="./icon.png" rel="icon"/>
<link href="./_.css" rel="stylesheet"/>
</head>
<body>
<p>Hello World!</p>
<img alt="An image of Katty." src="./katty.png"/>
</body>
</html>
Top comments (4)
Why would you want to add noise that does not help in the understanding of your code? Also, in some cases, this will break functionality, e.g. in a media tag, you may have either src or srcObject, but not both.
I hate it !
I mean :
That would be fine if I could use any other language than css and serve it in anything other than plain text... Maybe
But as it is what else am I going to write my styles in ?
You forgot
<p align="left">
, and 427 other attributesThe Meaning of HTML Life - Just one more attribute
youtube.com/watch?v=eAUYO6AY1ow
Just why? I can't see any advantage except teaching beginners what arguments there are.