The Semantic Web is an extension of the Web where information is represented in a machine processable way. In this paper, we present a two-level model for the Semantic Web from the perspective of formal language theory. The model consists of two grammars where the first level grammar is for creating ontologies and the second level grammar is for creating ontological instances. Based on the model, we implemented a system by which one can easily construct a small-scale Semantic Web environment.