How to Import HTML into Google Docs?

by Janeth Kent Date: 18-06-2020 google docs tricks tips html spreadsheet


Google Docs is a very flexible word processor in several ways, but what some people don't know is that you can embed HTML into a Google Doc.

There are 3 ways to do this. One is copying an HTML document directly from a browser and pasting it into a Google Doc. The other is a trick using the HTML import function in Google Sheets to customize the HTML formatting that you can then embed into a Google.The third one, using Word.

1. Embed an HTML page in a Google Doc

If you are preparing a document that requires information from the web, the last thing you want to do is paste that information as text.

This is because most online data contains information such as tables, graphs, images and more. For example, taking notes for research on an essay would be much easier if you could embed HTML into a Google doc from a web page.

Fortunately, doing this in Google Docs is very easy. It's simplified by the fact that Google Docs will automatically insert pasted web pages to include the original formatting, where possible.

Select the section of the web page you want to include in your document. Press Ctrl-C on the keyboard to copy that section.

Then, open the Google document you want to embed that HTML page in, right-click and select Paste. Be sure to select Paste and not Paste without formatting.

When you select Paste, Google Docs will automatically import the section of the page you've copied as much as possible into the formatting that appears on the original page. This includes images, URL links and headers.

You can check that the links are live by hovering over them. In Google Docs you'll see the external link appear.

In some cases the image format (such as the alignment on the page) may not match the original page from which it was copied.

2. Embed HTML in Google Doc with importHtml

Another method to embed HTML into your Google document is to embed the HTML into Google Sheets using the importHtml function. Then you can insert it into Google Docs.

Note that instead of embedding a section of the page, this function will insert the entire page. However, there is a way to avoid this by using an index number in the syntax of the function to import only one table or list on the page.

For example, let's say you want to embed the fourth table from the Wikipedia website on US demographics. First, open a new Google Sheets spreadsheet. In the first cell of the spreadsheet, type the function:

=ImportHTML("https://en.wikipedia.org/wiki/Demographics_of_the_United_States", "table", 4)

When you press Enter, this will import the fourth table of the web page and insert it in the table where the cursor is.

You now have the imported HTML data that you can use to embed in Google Docs. Format this table as you want it to look in Google Docs.

- To do this, select the table in Google Sheets and press Ctrl-C to copy the table.

- Place your cursor on the Google Docs document where you want to place the table, right-click and select Paste.
You'll see a pop-up window with a couple of options.

- Select Link to Spreadsheet and select the Paste button.

This inserts the Google Sheets table into Google Docs exactly in the original format.

By linking the table, you can always update the table in Google Sheets and it will automatically update in Google Docs.

3. Embedding HTML in Google Docs using Word

If you have your simple HTML code saved in a .html or .htm file, you can open it in Microsoft Word first. Word always tries to render an HTML file. You can then import this document into Google Docs and copy the entire page or a section of the page into the document you're editing.

To do this, open Microsoft Word and its HTML file. You should see the file rendered the way it would look inside a browser.

Save this document in Word format.


Then, go back to Google Drive and upload the file to your Google Drive account.
Once uploaded, right-click and select Open with, then select Google Docs.

This will open the document in Google Docs format, which is as close to the HTML representation as possible.

Now you can copy the entire HTML file, or just the section you want. Then paste it into the Google Docs document you're editing.

Here are three ways to embed HTML into a Google document. The option you choose depends on the tools you have available. It also depends on whether you want the whole page or just a section and how much accuracy you need to match the original format rendered in HTML.

 
by Janeth Kent Date: 18-06-2020 google docs tricks tips html spreadsheet hits : 79980  
 
Janeth Kent

Janeth Kent

Licenciada en Bellas Artes y programadora por pasión. Cuando tengo un rato retoco fotos, edito vídeos y diseño cosas. El resto del tiempo escribo en MA-NO WEB DESIGN END DEVELOPMENT.

 
 
 

Related Posts

Are you being floCed by Google?

No panic! Don't be alarmed, because it may sound worse than it is. But since Google doesn't seem to have any intention of communicating it properly, it's up to the…

Parental controls on Android: how to make mobiles and tablets child-friendly

Despite all the good things about them, mobile devices can expose your children to content that they're better off not seeing. The good news is that your Android phone or…

Interesting and Helpful Google Search Features You’ll Want to Start Using

Google – THE search engine for many internet users. It has been with us since its launch back in 1998 and thanks to its simplicity of use and genius algorithms,…

Google Maps updates and now shows gas prices at gas stations

Any help, no matter how small, that can make our daily life easier is welcome; for example, Google Maps has allowed us to move from one corner to another is…

Cumulative Layout Shift, what is and How to optimize CLS

Cumulative Layout Shift, one of the new Core Web Vitals metrics,  is the first metric that focuses on user experience beyond performance. Unexpected movement of web page content is a major…

Validating HTML forms using BULMA and vanilla JavaScript

Today we are going to write about contact forms and how to validate them using JavaScript. The contact form seems to be one of the top features of every basic home…

How to use your browser as a file browser, in Chrome or Microsoft Edge

We're going to explain how to use the Chrome browser as a file browser, both on Android and on your computer. This is a hidden feature of Chromium that will…

The best free tools for linkbuilding

Linkbuilding is one of the main factors in improving the SEO positioning of a page. Having a profile of inbound links from pages with great authority can mean the difference…

SEO: How to find and remove artificial links

At Ma-no we are aware of the importance of a good linkbuilding strategy in order to achieve success with a website. Links are key to placing a website among the top…

Google everywhere: anatomy of a massive giant

The alarm clock is going off. A hand floats over the bedside table groping for the source of the sound: probably a cell phone and maybe one of the more than…

What's the Difference between Google TV and Android TV?

At the end of September, Google launched the renewal of its classic dongle. The new Google Chromecast didn't arrive alone, but added two very important innovations compared to the devices…

How to watch deleted or private Youtube videos

Today we are going to talk about the technique which you permit to be able to recover videos from Youtube that was deleted, made private or simply blocked by Youtube…

We use our own and third-party cookies to improve our services, compile statistical information and analyze your browsing habits. This allows us to personalize the content we offer and to show you advertisements related to your preferences. By clicking "Accept all" you agree to the storage of cookies on your device to improve website navigation, analyse traffic and assist our marketing activities. You can also select "System Cookies Only" to accept only the cookies required for the website to function, or you can select the cookies you wish to activate by clicking on "settings".

Accept All Only sistem cookies Configuration