The terms "Web 3.0" and "Metaverse" now both refer to the third generation of the Internet. A theoretical framework for Web 3.0/Metaverse is constructed, which consists of three parts. The first part is the Web 3.0/Metaverse architecture, including the structure of the Internet at the Web 3.0/Metaverse system level and the structure of computers as the Internet end systems at the Web 3.0/Metaverse component level. The second part is the Web 3.0/Metaverse technology system, including nine Web 3.0/Metaverse technologies. The third part is the Web 3.0/Metaverse application world, which structurely integrates the virtual and real worlds into one and covers five fields, namely economy, politics, military, society, and culture, in either function or scene. A Web 3.0/Metaverse application system is a field or subsystem, or sub-subsystem, etc. of the Web 3.0/Metaverse application world. A kind of Web 3.0/Metaverse application, digital twinning, is analyzed. The first-principle of blockchain is proposed: in the Web 3.0/Metaverse application world, the core function of blockchain is to make contrust (common trust).