Emerging Web standards promise a network of heterogeneous yet interoperable Web Services. Web Services would greatly simplify the development of many kinds of information agents and knowledge management applications. Unfortunately, this vision requires that services provide large amounts of semantic metadata “glue”. As a step to automatically generating such metadata, we present an algorithm that learns to attach semantic labels to Web forms, and evaluate our approach on real Web data. The key idea is to cast Web form classification as Bayesian learning and inference over a stochastic generative model of the Web form design process.