Markup language refers to a computer language that defines elements inside a document with tags. As markup language is readable by human users, files written in this form feature standard words instead of the programming syntax seen elsewhere. Of the various markup languages available, HTML and XML are the most commonly used.
HTML is used when building webpages, with various HTML tags defining contents. For example, basic tags like <body> and <head> refer to page sections, but <form> and <image> apply to elements contained inside the page content. A beginning and end tag is necessary for the majority of elements, and the content will be positioned between those tags.
XML, though, is utilized for the storage of structured data as opposed to formatting a page’s content. HTML documents incorporate predefined tags, while XML files implement custom tags for defining elements instead. For instance, XML files storing data on computer models could include:
XML is known as ‘Extensible Markup Language’ as you can use bespoke tags for supporting a variety of elements. Standard text formats are used for saving every XML file, so it’s easier for programs to read or parse data contained within. As a result, XML is often the go-to option when exporting and sharing structured data across programs.
As a plain text format is used for saving HTML and XML files, they may be displayed in a standard text editor. Conveniently, you can use the ‘view source’ option in the view menu on most browsers to check out a page’s HTML source.