---json
{
"page_id": "4qv2owujdabxhcjcy1toy"
}
---
====== Data Resource - HTML ======
===== About =====
The ''html'' files are supported. Tabulify will extract by default the first ''html'' table (ie [[tabular_file|tabular file]] [[resource|data resource]]).
If you want the whole content, you can set the [[docs:resource:media-type|resource type]] to ''text''.
If there is no table element in the html page, the created resource has one cell with the whole content.
===== Example =====
[[howto:html:read|]]
===== Attributes =====
The [[docs:resource:attribute|data attributes]] for an HTML file are:
^ Name ^ Default Value ^ Description ^
| ''TABLE_SELECTOR'' | ''%%table%%'' | The Css selector to obtain the table element |
| ''HEADER_SELECTOR'' | ''%%th%%'' | The Css selector to obtain the headers elements in the table |
| ''ROW_SELECTOR'' | ''tr'' | The Css selector to obtain the rows in the table |
| ''DATA_SELECTOR'' | ''th, td'' | The Css selector to obtain the data cell in the row |
Because a ''html'' file is also a [[text|text file]], you can also set [[text#properties|text properties]] such as the character set.
===== FAQ =====
==== What happens if there is no table selected ? ====
If there is no table selected or present, the ''html'' file is considered a [[text|text file]].