What kind of formal semantics can describe HTML and CSS? Are there endeavours to do this. HTML/CSS layouts are espcially complex, so formalization can be of help.

  • 3
    $\begingroup$ a) Neither HTML nor CSS are programming languages. b) As such, neither operational nor denotational semantics make any sense. c) If you are looking for formal semantics, you need to be very clear about the state resp. result space. What is, formally, the "result" of HTML and/or CSS code? d) Which problems, specifically, are you trying to solve? $\endgroup$
    – Raphael
    Commented Oct 17, 2016 at 12:57
  • 1
    $\begingroup$ Data models can be formalized. The problem with descriptive languages is the way they relate to qualia, i. e. with experiential elements. Even so, there could be a path to formalization, at least to some extent, that could be profitable. $\endgroup$ Commented Oct 17, 2016 at 15:21

1 Answer 1


I think the paper "Automated Reasoning for Web Page Layout" might be interesting to you. This paper defines CSS semantics in order to verify the layout formally. Look at section 3 of the paper for details. This would be one of the ways to express the CSS semantics, although this is a bit different from other semantics for programming languages.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.