Wordの表をHTMLにする
- 選ぶ
- 確かめる
Wordで作った表を、Webページに載せたい。表のHTMLは、タグが多くて、手で書くと大変です。WordをHTMLに変換する は、Wordの表を、HTMLの表に変換します。
手順
- 「Wordファイルを選ぶ」で、表の入った .docx を選びます。
- 「HTML」の欄で、表が変換されているか確かめます。
- 「HTMLをコピー」でコピーして、Webページに貼り付けます。
変換される表
- 行と列の構造
- 各セルの文字
- 見出し行(Wordで設定されている場合)
変換されないもの
- セルの背景色
- 罫線のデザイン
- 列の幅
- 結合したセルの細かい見た目
きれいに変換するコツ
- 表は、Wordの「表の挿入」で作る(タブや空白で並べない)
- 1行目を、見出し行にする
- セルの結合は、なるべく避ける
- 文字は、セルの中に収める
貼り付けたあとの見た目
サイトの表のデザインは、サイト側のスタイルで決まります。貼り付けてから、罫線や色が必要なら、サイト側で設定します。
向いている場面
- 料金表や、スケジュール表をWebページに載せる
- 比較表を、ブログ記事に入れる
- 仕様一覧を、サイトに載せる
例
料金プランの比較表を、Wordで作った。このツールでHTMLにして、サイトのHTMLエディタに貼り付けると、行と列がそのまま表になった。
つまずきやすい点
- 表が崩れる:Wordで、タブ区切りで作った表は、表として変換されない。
- 幅が合わない:サイトの幅に合わせて、サイト側で調整する。
よくある質問
表の色は、そのまま残りますか?
いいえ。色は含まれません。サイト側で設定します。
まとめ
表は、Wordの表機能で作ってから変換。見た目は、サイト側で整えましょう。
WordをHTMLに変換するを使う(無料)あわせて使えるツール
- Wordから文字を取り出す:Wordファイルの本文を、文字だけで取り出します。
- CSVとJSONを相互変換する:CSVとJSONを、すぐに相互変換します。
- 文字数カウント(エントリーシート・レポート用):文章の文字数・行数・原稿用紙の枚数などを数えます。
同じツールの、ほかの解説
Converting Word Tables to HTML
- Choose
- Check
You want to put a table made in Word on a web page. HTML for tables has many tags and is laborious to write by hand. Convert Word to HTML converts Word tables into HTML tables.
Steps
- With "Choose a Word file", choose a .docx containing the table.
- Check in the "HTML" field that the table has been converted.
- Copy with "Copy HTML" and paste it into the web page.
Tables that convert
- Row and column structure
- Text in each cell
- Header rows (if set in Word)
What isn't converted
- Cell background colours
- Border design
- Column widths
- Fine appearance of merged cells
Tips for clean conversion
- Make tables with Word's "Insert Table" (don't line things up with tabs or spaces)
- Make the first row a header row
- Avoid merging cells where possible
- Keep text within the cells
Appearance after pasting
A site's table design is decided by the site's styles. If you need borders or colours after pasting, set them on the site side.
Good for
- Putting price lists or schedules on a web page
- Including comparison tables in blog posts
- Putting a specification list on a site
Example
Made a price plan comparison table in Word. Converted it to HTML with this tool and pasted it into the site's HTML editor; rows and columns became a table as they were.
Common stumbling blocks
- The table breaks: a table made with tab separation in Word isn't converted as a table.
- The width doesn't fit: adjust on the site side to fit the site's width.
Frequently asked questions
Do table colours remain?
No. Colours aren't included. Set them on the site side.
Summary
Make tables with Word's table feature before converting. Tidy the look on the site side.
Use "Convert Word to HTML" (free)Tools that go well with this
- Extract Text from a Word File: Extract the plain text from a Word file.
- Convert CSV and JSON: Convert between CSV and JSON instantly.
- Character Counter (for Applications and Reports): Count characters, lines and manuscript sheets of your text.