> For the complete documentation index, see [llms.txt](https://docs.kognitos.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kognitos.com/guides/platform/integrations/html.md).

# HTML

Overview of the HTML integration.

{% hint style="info" %}
The following documentation is for **HTML v1.16.0**.
{% endhint %}

## Overview

This integration reads and manipulates HTML documents, letting automations extract structured content from web pages and HTML files.

## Setup

The following integrations need to be connected to your Kognitos workspace:

* **HTML**

### Steps

Follow these steps to connect the integration in Kognitos:

{% stepper %}
{% step %}

#### Navigate

Using the left navigation menu, go to **Integrations** → **Explore Integrations**.
{% endstep %}

{% step %}

#### Find

Search for the integration and click on it.
{% endstep %}

{% step %}

#### Connect

Click on <kbd>**Connect**</kbd> to add a connection to the integration.
{% endstep %}

{% step %}

#### Configure

Add a name for the connection. You'll be prompted for [**authentication**](#authentication) details if needed. Then, click on <kbd>**Connect**</kbd>.
{% endstep %}
{% endstepper %}

## Actions

The following actions are available in the **HTML** integration:

### 1. Convert the html file to a pdf

Converts an HTML file to a PDF file using LibreOffice.

### 2. Create an html document from markdown

Creates a full HTML document from Markdown text.

### 3. Create an html document

Creates a full HTML document by wrapping a body HTML string.

### 4. Create an html table

Creates a full HTML document containing a table.

### 5. Extract html elements by selector

Extracts text content of HTML elements matching a CSS selector.

### 6. Extract links from the html file

Extracts all hyperlinks from an HTML file.

### 7. Extract tables from the html file

Extracts all tables from an HTML file as nested lists.

### 8. Fill an html template

Fills a Jinja2 HTML template with provided data.

### 9. Get the html file's metadata

Reads metadata from an HTML document's head.

### 10. Inject content into the html file

Appends HTML content to an element matched by a CSS selector.

### 11. Read the html file as markdown

Reads an HTML file as Markdown text.

### 12. Read the html file as text

Reads an HTML file as plain text by stripping all tags.

## Concepts

### Html link

A hyperlink extracted from an HTML document.

| Field Name | Description                  | Type             |
| ---------- | ---------------------------- | ---------------- |
| `text`     | The visible link text        | `text`           |
| `url`      | The href URL                 | `text`           |
| `title`    | The optional title attribute | `optional[text]` |

### Html metadata

Metadata extracted from an HTML document's head.

| Field Name    | Description                | Type             |
| ------------- | -------------------------- | ---------------- |
| `title`       | The document title         | `optional[text]` |
| `description` | The meta description       | `optional[text]` |
| `keywords`    | The meta keywords          | `optional[text]` |
| `charset`     | The declared character set | `optional[text]` |
| `language`    | The html lang attribute    | `optional[text]` |
