EmbeddedHTML

EmbeddedHTML["string"]

is an object that formats as a web frame containing the HTML content "string".

EmbeddedHTML[URL["url"]]

formats as a rendering of the webpage corresponding to the specified URL.

EmbeddedHTML[CloudObject[]]

formats as a web rendering of the specified cloud object.

Details

  • The string given to EmbeddedHTML can be HTML for a full HTML page, given in the form <html> ... </html>, or can be a sequence of pure HTML tags of the kind found in the body of an HTML page.
  • Using JavaScript or CSS requires giving the HTML for a full HTML page.
  • EmbeddedHTML is fully supported in the Wolfram Cloud System and can appear at any level in an expression. On desktop systems, it may be supported only as a separate browser window.
  • In the Wolfram Cloud System, EmbeddedHTML is rendered in an iframe and is robust with respect to malformed and malicious HTML.
  • The following option can be used:
  • ImageSizeAutomaticwidth and height reserved for web frame rendering
  • With ImageSize->Automatic, the web frame will be large enough space to render the HTML, so long as this does not make it larger than the notebook in which it appears.
  • In EmbeddedHTML[URL[]], if a webpage's headers forbid embedding, a link is returned that opens the webpage in a separate browser window.

Examples

open all close all

Basic Examples  (1)

Deploy a cloud notebook with embedded HTML:

In[1]:=
Click for copyable input
Out[1]=

On desktop systems, a button that opens the specified HTML in a separate browser window is shown:

In[2]:=
Click for copyable input
Out[2]=

Scope  (1)

Options  (1)

Possible Issues  (2)

Neat Examples  (1)

Introduced in 2014
(10.0)