> 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.15.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]` |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.kognitos.com/guides/platform/integrations/html.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
