"HTML on Word" lets you create an HTML file from a Word document without needing to write any tags. If you can create content in Word, you can also create HTML files, even if you're not familiar with HTML. By linking CSS (Cascading Style Sheets) in the HTML conversion options, you can control the layout and styling of the output HTML.
For more customized layout and styling, you can use Word, HTML, CSS, and JavaScript as needed.
* To be viewable on the Internet as a website, the HTML file created above must be uploaded to a Web server.
To make your website accessible on the Internet, upload the output HTML files, images, CSS files, and other related resources to your web server, then publish a link (URL) to the relevant page. For guidance on uploading files, please consult your web server provider or administrator.
If you only need to share the HTML file with a specific person, you can either transfer the output HTML file, images, CSS files, etc., via a storage device like a USB flash drive, or send them as an email attachment (we recommend combining the files into a zip file). Ask the recipient to open the HTML file in a web browser.
Tip:
In both cases, avoid altering the file and folder structure, file names, or folder names in the output. Any changes may break links between files in the HTML and prevent them from displaying correctly. It's also recommended to use only single-byte alphanumeric characters and certain symbols (such as hyphens and underscores) in file and folder names. The Word document to be converted should follow the same naming conventions.
"HTML on Word” itself does not have a feature to add a full-text search feature to the output HTML. Please install a server-side full-text search feature on your web server or prepare a full-text search program (script) using JavaScript separately.
"HTML on Word” does not support output of the ‘target’ attribute of the <a> tag, so it is not possible to specify the screen to be displayed when clicking on an HTML hyperlink.
Tip
It is possible to display links in a separate screen (tab) using JavaScript.
The web browser that displays HTML when converted from the Word add-in is the application associated with HTML (extension .html) as a default application in the Windows settings.
If you want to change this, display the Windows ‘Settings’ > ‘Apps’ > ‘Default apps’ screen and enter ‘.html’ in the ‘Set a default for a file type or link type’. Then, when you click on the displayed application, the ‘Select a default app for .html files’ screen is displayed, so select the application you want to display (e.g. web browser) and click ‘Set default’ to set the application. (In the case of Windows 11.)
Default application settings (Windows 11)
"HTML on Word" allows you to output HTML in separate sections using headings (or paragraphs) with a specified outline level (levesl 1-3 are covered) in the body of a Word document.
If you want to output a Word document divided into chapters or sections, do the following:
1. Specify outline levels 1-3 for chapter and section headings in Word.
2. Configure the settings for separate output in the conversion settings of "HTML on Word".
1. Specify outline level 1-3 for chapter and section headings in Word.
To specify an outline level for chapter and section headings in Word, simply select the relevant paragraph (heading part) and click on the ‘Heading 1’, ‘Heading 2’ or ‘Heading 3’ style in the style gallery to set outline levels 1-3. (If you are using a ‘blank document’ in a Word template.)
Tip
Some types of Word templates have a standard outline level for the heading style. To check if an outline level has been specified for a style, do the following:
Right-click on an applied style in the style gallery and select “Modify” from the menu that appears.
Click the “Format” button at the bottom left of the “Modify Style” screen and select “Paragraph".
In the “Paragraph” screen that appears, check if Level 1-3 are specified in the “Outline level” section.
2. Configure “HTML on Word” conversion settings for split output.
To split HTML with the outline level, specify the following parameters (command line) in the “HTML on Word” conversion options.
Parameter: ex. splitting at outline level 1 (excerpts of the specified parts only)
-split 1
The above will split the HTML into separate outputs with headings that have outline level 1 set when the conversion to HTML is executed.
To convert to a heading tag, the style you specified as a heading in Word must have an outline level set.
1. Right-click the relevant heading style in the Word "Styles" gallery and select ‘Modify’.
2. Select ‘Paragraph’ from ‘Format’ in the bottom left-hand corner of the ‘Modify Style’ screen displayed to display the ‘Paragraph’ screen.
3. Make sure that levels 1-6 are selected in the ‘General’ - ‘Outline level’ under the ‘Indents and Spacing’ tab.
Tip
Output as heading tags (h1, h2, h3, etc.) will be outline levels 1-6. If outline level 7-9 is specified, ‘l7-l9’ is output as a class attribute in the paragraph tag (<p>).
Example: If outline level 7 is specified = <p class="l7">
A line break inserted by pressing the “Enter” key on Word is properly a “paragraph break”. For this reason, <p> tags are output in the output HTML.
If you want to output <br> tags, press the “Shift” key and “Enter” key at the same time in Word.
If a paragraph break is inserted within a numbered list in Word and the paragraph format is changed, the following numbered sections will be output as paragraph tags (<p>).
To maintain the list format<ol><li>, avoid pressing the "Enter" key to insert a paragraph break in the middle of the list. Instead, if you need a line break within the list, use "Shift" + "Enter."
"HTML on Word” can output the font color specified in Word using the ‘style’ attribute of the <span> tag.
Font Color: Word
To output the font colors specified in Word to HTML <span> tags, specify the following parameters (command line) in the “HTML on Word” conversion options.
Parameter (excerpts of the specified parts only)
-textcolor
Font coolor output result: HTML
* If you set the font color to be output, the font color automatically added in Word will also be output.
Example: Hyperlink location specified in Word.
Hyperlinks set to images in Word are currently not output when converted to HTML. Please set hyperlinks to text strings.
To output a table of contents in the output HTML, insert a table of contents (either an Automatic Table or a Custom Table of Contents) using the table of contents function in the original Word document. If a table of contents is inserted in the Word document, it will be output as a linked table of contents in the output HTML.
*In order to insert an Automatic Table or a Custom Table of Contents, an outline level must be set for the headings.
References - Table of Contents: Word
If you click on a link in the output table of contents, you can jump to the relevant heading. If the HTML is split and output, you can also jump to the heading of the HTML that is split.
If you update the table of contents in the Word table of contents function, this will also be reflected in the output HTML table of contents.
Source code of the output table of contents section: HTML
Both HTML and PDF can be created from a single Word document, but each needs to be created separately in different software (or Word functions).
HTML is created using "HTML on Word".
PDF can be created by specifying the file type as PDF and saving the file from the standard Word function ‘Save As’.
Tip
HTML and PDF require layout and decoration to be specified in each. HTML is laid out and decorated by linked CSS, so it is important to specify headings, paragraphs, images, tables and styles in Word.
PDF output approximates the way things look in Word, so while you can lay out and decorate relatively freely in Word, be aware that if you lay out without considering the output to HTML, the layout may be corrupted.
For more information see the following links.
→ Structure Differences in Word vs HTML and Impact on Conversions
→ HTML on Word Online Manual: ‘Chapter 6 Word Editing Guidelines’
In "HTML on Word", you can output the value of the class attribute (class name) you have set for the paragraph tag (<p> tag).
The class name outputs the name set in the Word style. You can right-click on an existing style in the ‘Styles' gallery in Word and select ‘Modify’, or if you want to create a new style, click on the drop-down arrow at the bottom right of the ‘Styles’ gallery and select ‘Create a Style’ to edit the name of the style.
Modify Style - Name: Word
To output the names set in the style as HTML class names, specify the following parameters (command line) in the options of the "HTML on Word" conversion.
Parameter (excerpts of the specified parts only)
-pstyle
Output result of class name: HTML
Tip
Style names other than single-byte alphanumeric characters and some single-byte symbols are not output in the value of the class attribute. If the style name starts with a single-byte number, a leading ‘_’ (underscore) is added to the name and output. (For 1style: class="_1style")
In "HTML on Word", you can output the value of the class attribute (class name) you have set for the table tag for HTML (<table> tag).
The class name outputs the name set for the table style in Word. You can select the table in Word, click on the drop-down arrow at the bottom right of the ‘Table Styles' gallery in the ‘Table Design’ tab, select the ‘New Table Style’ and specify to the ‘Name’ entry in the ‘Create New Style from Formatting’ screen.
Create New Style from Formatting - Name: Word
The name of the table style is output to the class name of the HTML <table> tag as standard, even if you do not specify any options for the "HTML on Word" conversion.
* If you have created a new table style, the style may not be applied to the selected table, so select the table and re-apply the newly created table style.
Output result of class name: HTML
Tip
Style names other than single-byte alphanumeric characters and some single-byte symbols are not output in the value of the class attribute. If the style name starts with a single-byte number, a leading ‘_’ (underscore) is added to the output. (For 1table-style: class="_1table-style")
If you change the name of a table style in a template you are using in Word, the name is not output to the class name of the <table> tag, but the name used in the Word document data. If you rename a newly created table style, you can output it with the changed name.
Currently, web pages are mainly designed by separating the text (the body of the HTML) from the design.
For this reason, HTML is written simply according to the syntax, while design such as decoration and layout is written within HTML using CSS (Cascading Style Sheets) and JavaScript, or each file is linked from HTML.
"HTML on Word" outputs simple HTML that follows HTML syntax. By not outputting extra tags, HTML can be easily edited, and CSS and JavaScript can be applied to allow the author to freely design decorations and layouts.
If you want to do decorations, layouts, etc., link CSS and JavaScript. Sample CSS is included in HTML on Word. When you install the product, a ‘CSS’ folder is created in the same folder as the programme (exe) with some sample CSS (extension .css), so if you want to convert from the Word add-in, check the ‘Use specified CSS checkbox and specify the sample CSS to perform the conversion.
To create a layout like the manual in "HTML on Word V2", do the following.
1. Prepare a document in Word with outline levels 1 to 3 and a table of contents inserted for the automatic creation of Word functions.
2. Execute the following command from the command line as a conversion option for "HTML on Word".
Word2HTML -clrsettings -endl -css "C:\Program Files\Antenna House\xhw20\CSS\sample-toc.css" -viewport width=device-width,user-scalable=yes -js https://code.jquery.com/jquery-3.7.1.min.js -js smartphone-btn.js -pstyle -fileimages -hstrong -defstyle -split 1 -pagenavi ja -savedefault
For JavaScript, download the following file and save it in the same folder as the HTML output. →smartphone-btn.js
3. The above uses the ‘sample-toc.css’ that is copied when the programme is installed. If you have not changed the installation location of the programme during installation, the following will be used. (In the case of V2.0)
C:\Program Files\Antenna House\xhw20\CSS\sample-toc.css
This CSS is specified to hide the buttons for smartphones if used as is, so please delete the following sections before use.
*If you cannot edit the file in the ‘Program Files’ folder, copy it to a folder with access rights, such as the desktop, and then edit it, and specify that file when specifying CSS on the command line.
Delete the following at the end of ‘sample-toc.css’.
#mobile-side-btn {
display: none;
}
4. Click on the ‘Convert to HTML’ button from the Word add-in to run it.
This will output HTML that can be displayed in a similar layout on PCs and smartphones.
Tip
Some additional styles and JavaScript are omitted.
The following two settings are recommended to ensure that a single HTML is displayed properly on devices with various screen sizes, including smartphones.
1. viewport settings.
2. CSS settings to match the screen size.
In "HTML on Word", you can use the conversion setting options (viewport) and CSS to ensure that the output can be displayed appropriately on screens such as smartphones.
1. viewport settings
A viewport is an HTML meta element that specifies how HTML is displayed on the screen (display area), and is described using <meta> tags within the HTML <head> tag.
To output a viewport in "HTML on Word", specify the ‘-viewport’ parameter followed by a single space and the value of the content attribute in the command line configuration.
Examples of parameter (excerpts of specified parts only)
-viewport "width=device-width, initial-scale=1.0"
Content output in HTML head
<meta name="viewport" content="width=device-width, initial-scale=1.0">
2. CSS settings
CSS allows you to specify layout and decoration for HTML tag and class. In "HTML on Word", by specifying CSS as an option in the conversion settings, the specified CSS file is copied to the same folder as the HTML and a link to the CSS is output within the HTML <head> tag.
For optimum display on smartphones and other devices, use media queries to describe the style for each display area.
To output CSS links in "HTML on Word", specify the full path of the CSS file stored on the PC by following the ‘-css’ parameter with a space in the command line settings.
In addition, the media attribute can be specified following a space.
Example of parameter (excerpt of specified part only)
In this example, the sample CSS included with the product is specified. The sample CSS has media queries specified in the file, so the media attribute is not included in the command.
-css "C:\Program Files\Antenna House\xhw20\CSS\sample.css"
Content output in HTML head
<link rel="stylesheet" href="sample.css">
To specify a media query, write as follows. (For CSS that applies to screen resolutions up to 480 pixels wide.)
-css "C:\Program Files\Antenna House\xhw20\CSS\sample.css" "screen and (max-width:480px)"
Content output in HTML head
<link rel="stylesheet" href="sample.css" media="screen and (max-width:480px)">
Sorry, we do not offer customization of style sheets or JavaScript.
Multiple Word files that have been created separately, e.g. by chapter, cannot be output as a single HTML or multiple HTML files such as interlinked with a table of contents.
Word documents in XML format (with the extension .docx) can be converted to HTML. However, some Word documents originally created for print or PDF distribution are often formatted using spaces, paragraph breaks, and other editing techniques that adjust text position and appearance to enhance document layout. When these documents are converted to HTML, their layout may become distorted or appear unexpectedly.
In such cases, significant modification may be required to achieve the desired HTML layout.
Tip:
"HTML on Word" is ideal for creating new HTML files without needing to write HTML tags manually. It allows you to easily create HTML using Word. While you can convert existing Word documents, you can also structure and style content specifically for the web, optimizing the output for web page use.
"HTML on Word" does not output Word header and footer sections to HTML. For this reason, the page numbers set for them are also not output.
Page numbers inserted into the body text in Word are inserted as text strings in the body text, so they are output at the insertion point in the same way as normal text strings.
To output the top row of a table with <thead> around it, select the table in Word and check only ‘Header Row’ under ‘Table Style Options’ in the ‘Table Design’ menu.
To output the first column of a table with <th>, select the table in Word and check only ‘First Column’ under ‘Table Style Options’ in the ‘Table Design’ menu.
If any option other than the above is checked, or if more than one option is checked at the same time, no output will be produced.
HTML cannot be split at page breaks. If you want to split HTML, specify a heading (or paragraph) with an outline level (1-3) for the text you want to split, and specify the split output in the "HTML on Word" conversion settings.
The command line directly manipulates the operating system and applications by entering commands (text that serves as command statements) on a screen called the command line interface. The command line interface is provided as standard in Windows with the Command Prompt.
Use the following procedure from the Command Prompt.
1. To change the conversion settings from the command line, first start the Command Prompt.
For the Command Prompt, press the ‘Windows’ key and ‘R’ key simultaneously on the PC keyboard to display ‘Run’, enter ‘cmd’ in the input field and click the ‘OK’ button.
2. The Command Prompt screen will appear and you can type commands on this screen and press ‘Enter’ to execute the commands.
3. To run "HTML on Word", enter the command ‘word2html’ followed by the text that will be the options/parameters and run it. Changing settings (editing the settings file) can also be done from the "HTML on Word" programme.
If you enter only ‘word2html’, information such as the version of "HTML on Word" you are using, information on maintenance deadlines and a list of available options will be displayed.
For more information on settings from the command line, see the product manual.
→ HTML on Word V2 User's Manual, Chapter 3: Command-line version
When you install the purchased product, it will operate as an evaluation version.
To make it work as a official product, replace the license file (file name: xhwlic.dat) provided at the time of purchase with “xhwlic.dat” in the folder where the program was installed.
The folder for program installation is as follows if it was not changed during installation. (In the case of V2.0)
C:\Program Files\Antenna House\xhw20
The product can still usable after the maintenance period has expired. However, it is recommended to subscribe to a paid maintenance service as the revised version released after the maintenance expiry date cannot be used.
Tip
Although you can continue to use the product after the maintenance period has expired, the Product may not work properly due to Windows updates, Word updates or other changes in the environment of your computer (e.g. security software updates). In addition, even if there is a problem with the product itself, the revised version cannot be used if you have not subscribed to the maintenance service.
The maintenance service has the advantage of providing revised versions of the product, upgrading to the latest version of the product, and providing support for the product, so please consider signing up for the maintenance service.
Awards
Contact
Privacy Policy | © 2025 Antenna House, Inc.