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

</p> </td> </tr> <tr> <td rowspan="" colspan="" dir="auto"> <p id="par_id3153778" class="paragraphintable" dir="auto">Subject</p> </td> <td rowspan="" colspan="" dir="auto"> <p id="par_id3147228" class="paragraphintable" dir="auto"><META NAME="CLASSIFICATION" CONTENT="Field Content"></p> </td> </tr> <tr> <td rowspan="" colspan="" dir="auto"> <p id="par_id3154908" class="paragraphintable" dir="auto">Keywords</p> </td> <td rowspan="" colspan="" dir="auto"> <p id="par_id3156422" class="paragraphintable" dir="auto"><META NAME="KEYWORDS" CONTENT="Field Content"></p> </td> </tr> <tr> <td rowspan="" colspan="" dir="auto"> <p id="par_id3151041" class="paragraphintable" dir="auto">Description</p> </td> <td rowspan="" colspan="" dir="auto"> <p id="par_id3125863" class="paragraphintable" dir="auto"><META NAME="DESCRIPTION" CONTENT="Field Content"></p> </td> </tr> <tr> <td rowspan="" colspan="" dir="auto"> <p id="par_id3159149" class="paragraphintable" dir="auto">Custom Properties</p> </td> <td rowspan="" colspan="" dir="auto"> <p id="par_id3157892" class="paragraphintable" dir="auto"><META NAME="Custom field name" CONTENT="Custom field content"></p> </td> </tr> </table> <br> <div class="note"> <div class="noteicon" dir="auto"><img src="media/icon-themes/res/helpimg/note.svg" alt="note" style="width:40px;height:40px;"></div> <div class="notetext"><p id="par_id3155855" dir="auto">When you import an HTML containing these META tags, the contents of the tags are added to the corresponding LibreOffice file property box.</p></div> </div> <br> <div class="tip"> <div class="noteicon" dir="auto"><img src="media/icon-themes/res/helpimg/tip.svg" alt="tip" style="width:40px;height:40px;"></div> <div class="notetext"><p id="par_id0926200812164481" dir="auto">Keywords must be separated by commas. A keyword can contain white space characters or semicolons.</p></div> </div> <br> <h3 id="hd_id3163822" dir="auto">Import Tips</h3> <p id="par_id3155307" class="paragraph" dir="auto">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.</p> <p id="par_id3146146" class="paragraph" dir="auto">Scripts, comments, and META tags that are positioned directly before a TABLE tag are inserted in the first cell of the table.</p> <p id="par_id3155366" class="paragraph" dir="auto">Scripts and META tags in the header of an HTML document are imported and anchored to the first paragraph in the document.</p> <p id="par_id3152885" class="paragraph" dir="auto">To set the options for importing HTML tags, choose <span id="swlnsystextshared01about_meta_tagsxml_1" class="switchinline"><span hidden="true" id="MACtextshared01about_meta_tagsxml_1" class="MAC"><span class="emph">LibreOffice - Preferences</span></span><span hidden="true" id="defaulttextshared01about_meta_tagsxml_1"><span class="emph">Tools - Options</span></span></span><span class="emph"> - Load/Save - HTML Compatibility</span>. 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.</p> <h3 id="hd_id3163717" dir="auto">Export Tips</h3> <p id="par_id3159180" class="paragraph" dir="auto">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.</p> </div> <div id="SearchFrame"></div> <div id="DonationFrame"></div> <footer><div id="DEBUG" class="debug"> <h3 class="bug">Help content debug info:</h3> <p dir="auto">This page is: <a href="https://opengrok.libreoffice.org/xref/help/source/text/shared/01/about_meta_tags.xhp" target="_blank">/text/shared/01/about_meta_tags.xhp</a></p> <p dir="auto">Title is: HTML import and export</p> <p id="bm_module" dir="auto"></p> <p id="bm_system" dir="auto"></p> <p id="bm_HID" dir="auto"></p> </div></footer> </body> </html>