When writing in HTML, the <figure> tag is a block element used to designate an area of self-contained content that does not affect the main flow of the article. It is useful with items like diagrams, illustrations, images, and sections of computer code.