Computer Science
Algorithm
Data Processing
Digital Life
Distributed System
Distributed System Infrastructure
Machine Learning
Operating System
Android
Linux
MacOS
Tizen
Windows
iOS
Programming Language
C++
Erlang
Go
Scala
Scheme
Type System
Software Engineering
Storage
UI
Flutter
Javascript
What is Wrong about HTML and CSS (2014)
Virtualization
Life
Life in Guangzhou (2013)
Recent Works (2013)
东京之旅 (2014)
My 2017 Year in Review (2018)
My 2020 in Review (2021)
十三年前被隔离的经历 (2022)
A Travel to Montreal (2022)
My 2022 in Review (2023)
Travel Back to China (2024)
Projects
Bard
Blog
RSS Brain
Scala2grpc
Comment Everywhere (2013)
Fetch Popular Erlang Modules by Coffee Script (2013)
Psychology
耶鲁大学心理学导论 (2012)
Thoughts
Chinese
English

What is Wrong about HTML and CSS

Posted on 14 Feb 2014, tagged webHTML

In my last blog, I wrote it is good to use HTML + JS + CSS. But I found I was just enjoy the part of the isolate between them, but not the language (HTML and CSS). I will talk about what is wrong about HTML and CSS.

The earliest web pages is invented to show documents. In the documents, there are titles, lists, tables and so on, so we could not just write plain text. That is what HTML for.

The web tech is growing too fast. Thanks to Javascript, people could be able to write a very complex web application. But since it is a web application, we must write HTML at the end.

But that was not what HTML is born for. HTML is just a tool for writing document but not a tool for programming. The most important part in HTML is the text. But in an application, the text is dynamically generated by the program . Even more, it is not necessary if the text is the most important part. For example, some of them are games, so the graph is the most important part; Some of them are Email client, so the list is the most important part; And so on.

The same thing happens on CSS. The tags in CSS is mainly used to layout documents. It may not suitable to layout a Email client, a game or a video player. And when people found the tags are not enough, they must support them in the next version and it may take many years. If it is programmable, we could just custom our tags by programming.

So it is not wrong about HTML and CSS in the first. The are just behind the times. If we really want to write complex application, we’d better to use a more powerful tool. There are many techs to solve that problem. Such as Google’s Web Components to extend HTML. After that, I think HTML is just the “main file” of the applications. It is the entry of the application and uses the APIs defined by the libraries written with JS. So why not just use JS, or another programming language to write the “main file”? If we keep a good programming principle in mind, the code will be neater and cleaner than HTML.

I’d love to see that happens. If I have time, I will do some experiments on it.