In this paper an infinite-dimensional approach to model energy forward markets is introduced. Similar to the Heath–Jarrow–Morton framework in interest-rate modelling, a first-order hyperbolic stochastic partial differential equation models the dynamics of the forward price curves. These equations are analysed, and in particular regularity and no-arbitrage conditions in the general situation of stochastic partial differential equations driven by an infinite-dimensional martingale process are studied. Both arithmetic and geometric forward price dynamics are studied, as well as accounting for the delivery period of electricity forward contracts. A stable and convergent numerical approximation in the form of a finite element method for hyperbolic stochastic partial differential equations is introduced and applied to some examples with relevance to energy markets.