# `Premailex.HTMLParser`
[🔗](https://github.com/danschultzer/premailex/blob/v1.0.0/lib/premailex/html_parser.ex#L1)

Behaviour for HTML parsing.

By default, Premailex prefers `LazyHTML`, then `Floki`, then `Meeseeks`,
falling back to the built-in `Premailex.HTMLParser.Xmerl` if none are
loaded. The active parser can be configured:

    config :premailex, html_parser: Premailex.HTMLParser.LazyHTML

# `parse`

```elixir
@callback parse(Premailex.html()) :: Premailex.html_tree()
```

Parses an HTML string into a `t:Premailex.html_tree/0`.

Adapters raise `ArgumentError` when the input cannot be parsed.

# `to_html`

```elixir
@callback to_html(Premailex.html_tree()) :: Premailex.html()
```

Converts a `t:Premailex.html_tree/0` into an HTML string.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
