Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

131
Vistas
HTML <object> Tag

I'd like to start this question by saying that I'm very new to HTML and don't have any formal experience. My goal is to add a snippet of HTML code containing an interactive figure into another HTML document. I have figured out how to do this by using the <object> Tag. The only problem I'm facing is that data= field needs a URL to a separate file. I can't have a two HTML files, as I need to give my client a single HTML. Is there a way to create a new string containing the HTML code of the interactive figure -- then pass it to the data= field? Or something similar?

<object align="center" style="width:30%;height:500px" data="/Users/Desktop/plotly_test2.html"></object>

To reiterate: I was able to use <object> Tag to load the interactive figures into my HTML; however, I am looking for a way to supply the data= field with a string of the HTML, rather than a path to an HTML file.

<object align="center" style="width:30%;height:500px" data="/Users/Desktop/plotly_test2.html"></object>

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

It is possible by encoding the inner HTML using the URL data scheme.

This is most often done with small images.

The URL becomes something like so:

... data="data:<HTML-base64-encoded>" ...

Of course, the prohibits easy editing, although you can write a script to convert your two HTML documents into one, automatically.


As a side note, in most cases people use <iframe ...> to include another HTML page, rather than <object ...>.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda