The Internet today has a phenomenal reach---right into the homes of a vast audience worldwide. Some organisations (and individuals) see this medium as a good opportunity for extending the reach of their computer systems. One popular approach used for such endeavours is to run an application on a server, using web technology for displaying its user interface (UI) remotely. Developing such a web-based UI can be quite tedious---it is a concurrent, distributed program which has to run in a hostile environment. Furthermore, the platform on which it is implemented (the web) was not originally intended for such usage. A web framework is a collection of software components which provides its users with support for developing and executing web-based UIs. In part, web frameworks can be seen as being analogous to interpreters: given a specification of a UI using a specification technique dictated by the framework, server components of the framework can present the UI using web technology. Topics related to web frameworks are scarce in the academic literature, but abound in industry and open discussion forums. Similarly, the designers of web frameworks seldom found their work on existing theory in the literature. This study is an attempt to bridge this gap. It is focused on two aspects of web frameworks: the specification technique a framework mandates, and how such a specification can subsequently be used to present a UI via web technology. As part of this study, a survey was conducted of 80 open source web frameworks. Based on the survey, a partial overview of the domain of web frameworks is given, covering what is seen as being typically required of a web framework and covering specification techniques that are used by existing frameworks. Two taxonomies are proposed of the strategies web frameworks use for specifying two aspects of web UIs. Using the web as platform implies adherence to certain (intended) architectural constraints. Web framework designers often strain against these constraints. However, another point of view is to recognise that the success of the web platform is made possible precisely because of its intended architecture. (And the success of the web is surely the principal motivation for using it for remote UIs in the first place.) With the bias of this viewpoint, a specification technique is proposed for web-based UIs. This technique is based on the well-known formalism of statecharts, with semantics explicitly defined in terms of the intended architectural components and constraints of the web. The design of a web framework for presenting a UI so specified is also proposed (based on the theoretical background given, as well as two prototype implementations which have been developed).