This document provides an overview of SGML and XML. It describes SGML as a metalanguage that uses start and end tags along with elements that can contain other subelements in a hierarchical structure. XML is described as a type of SGML that is easier to process due to requiring end tags and other simplified features. Examples are given of how MARC21 records can be encoded in both SGML and XML formats. The development of XML by the W3C and alternatives to DTDs like XML Schema are also summarized.