# Code and data > Code, diagrams, formulas and component references kept next to the text. Source: Code, diagrams, formulas and component references kept next to the text. | Component | Purpose | | --- | --- | | [Code](https://docara.io/en/components/code-and-data/code/) | A code block with highlighting, copying and line wrapping | | [Code from a file](https://docara.io/en/components/code-and-data/code-from-file/) | A fragment of a project file that updates together with the file | | [Diagram](https://docara.io/en/components/code-and-data/diagram/) | A Mermaid diagram stored next to the text | | [Diagram gallery](https://docara.io/en/components/code-and-data/diagram-gallery/) | All 22 Mermaid diagram types with a live result and the source | | [Math formula](https://docara.io/en/components/code-and-data/math/) | A formula written in TeX | | [Isolated HTML](https://docara.io/en/components/code-and-data/html/) | Checked HTML markup in a separate frame | | [Component reference](https://docara.io/en/components/code-and-data/component-reference/) | Attributes, events, methods and CSS variables from the component manifest | ## How to choose Write a short piece of code right in the text as a code block. When the piece comes from a project file, include it as code from a file: it updates together with the file. Show relations and processes as a diagram and formulas in TeX notation. A component reference collects attributes, events and methods from the manifest, so the parameter table does not need to be kept by hand.