Design notes HTML

0
Here we discuss the design philosophy and goals that have shaped the development of HTML and its associated technologies. 
  • HTML's Complex History: HTML, the Document Object Model (DOM) APIs, and related technologies have been developed over many years by different people with various priorities. These developers often worked independently without knowledge of each other's efforts. This has led to the emergence of features that may appear inconsistent or nonsensical.
  • Historical Implementation Bugs: Because of the unique nature of the web and the fact that web content is created by diverse authors, implementation bugs that initially seemed like errors have sometimes become accepted and even standardized behaviors due to existing content relying on them.
  • Design Goals: Despite the challenges arising from HTML's complex history, the HTML Living Standard makes an effort to adhere to certain design goals and principles.
  • Serializability of Script Execution: One key design goal is to ensure that web authors are not exposed to the complexities of multithreading. HTML and DOM APIs are designed to make it so that no script can detect simultaneous execution of other scripts. This ensures that scripts are executed in a way that appears to be completely serial, even when using web workers. The exception to this rule is JavaScript's SharedArrayBuffer, which allows scripts to observe concurrent execution.
  • Compliance with Other Specifications: The HTML Living Standard interacts with and relies on various other specifications. In some cases, the HTML specification may violate the requirements of these other specifications due to conflicting needs. When this happens, such violations are explicitly noted as "willful violations" with reasons provided.
  • Extensibility: HTML provides a wide array of extensibility mechanisms for web authors to add semantics and functionality in a safe manner. These mechanisms include using the class attribute to extend elements, adding data-*="" attributes for client-side and server-side script data, using meta elements for page-wide metadata, annotating links with specific meanings through the rel attribute, embedding raw data using script elements, extending APIs via JavaScript prototyping, using microdata for embedding data for sharing with other applications, and defining custom elements to expand HTML's vocabulary.
Here we explained the challenges and considerations involved in the development of HTML and associated technologies, as well as the design goals and principles that guide their development. It also highlights the importance of extensibility to allow web authors to enhance HTML's functionality while maintaining compatibility.
Tags

Post a Comment

0Comments
Post a Comment (0)