Contents

# HTML import and export

When you export a file to an HTML document, the description and the user-defined file properties are included as META tags between the HEAD tags of the exported document. META tags are not displayed in a Web browser, and are used to include information, such as keywords for search engines on your Web page. To set the properties of the current document, choose File - Properties, click the Description or Custom Properties tabs, and then type the information you want.

The following file properties are converted to META tags when you export a file as an HTML document:

ODF Property | HTML Tags
--- | ---
Title | <TITLE>
Subject | <META NAME="CLASSIFICATION" CONTENT="Field Content">
Keywords | <META NAME="KEYWORDS" CONTENT="Field Content">
Description | <META NAME="DESCRIPTION" CONTENT="Field Content">
Custom Properties | <META NAME="Custom field name" CONTENT="Custom field content">

When you import an HTML containing these META tags, the contents of the tags are added to the corresponding LibreOffice file property box.

Keywords must be separated by commas. A keyword can contain white space characters or semicolons.

### Import Tips

When you import an HTML document, following META tags are automatically converted to LibreOffice fields: <META HTTP-EQUIV="REFRESH"...> and <META NAME="..." ...> , where NAME equals to AUTHOR, CREATED, CHANGED, CHANGEDBY, DESCRIPTION, KEYWORDS or CLASSIFICATION.

Scripts, comments, and META tags that are positioned directly before a TABLE tag are inserted in the first cell of the table.

Scripts and META tags in the header of an HTML document are imported and anchored to the first paragraph in the document.

To set the options for importing HTML tags, choose LibreOffice - PreferencesTools - Options - Load/Save - HTML Compatibility. A known META tag contains either "HTTP-EQUIV" or "NAME", and are imported as LibreOffice comments. The only exception is <META NAME="GENERATOR"...>, which is ignored.

### Export Tips

Comments and script fields at the beginning of the first paragraph in a document are exported to the header of an HTML document. If the document begins with a table, the first paragraph in the first cell of the table is exported to the header of the HTML document.

Please support us!