# Simple usage

The simplest way to use Webforai

## Install dependencies

Install the necessary packages:

```bash
npm init -y
npm install webforai
npm install -D tsx
```

## Write code

Here’s how to convert HTML to Markdown using **webforai**:

```ts
import { htmlToMarkdown } from "webforai";
import { loadHtml } from "webforai/loaders/fetch";
 
const html = await loadHtml("https://example.com");
const markdown = htmlToMarkdown(html);
 
console.log(markdown);
```

## Launch

```ts
tsx src/index.ts
 
# => # Example Domain
# => 
# => This domain is for use in illustrative examples in documents. You may use this
# => domain in literature without prior coordination or asking for permission.
# => 
# => More information...
```
