Title: Adding html with javascript in a post
Last modified: August 19, 2016

---

# Adding html with javascript in a post

 *  [asa3000](https://wordpress.org/support/users/asa3000/)
 * (@asa3000)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/adding-html-with-javascript-in-a-post/)
 * How can I embed html with javascript in a post?
 * I need to put a page like this one:
 * [http://perso.wanadoo.es/autoenglish/gr.posadpro.i.htm](http://perso.wanadoo.es/autoenglish/gr.posadpro.i.htm)
   
   in my post. I want to put the script without having to use iframe.
 * Thanks in advance.

Viewing 1 replies (of 1 total)

 *  [David Ollenberger](https://wordpress.org/support/users/david-ollenberger/)
 * (@david-ollenberger)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/adding-html-with-javascript-in-a-post/#post-1943505)
 * Hello,
 * I’ll do my best to help you out. You can put your javascript in a separate file
   and call it in the post like this (be sure to use HTML view in the editor):
 * `<script src="http://www.yourdomain.com/wp-content/themes/yourtheme/myfile.js"
   type="text/javascript"></script>`
 * Alternatively, you can create a page template and include the code above or below
   the loop. In this case the result will always appear above or below your content
   but it’s a much more flexible way to include javascript. For more information
   on creating page templates go here:
 * [http://codex.wordpress.org/Pages#Page_Templates](http://codex.wordpress.org/Pages#Page_Templates)
 * Cheers,
    David

Viewing 1 replies (of 1 total)

The topic ‘Adding html with javascript in a post’ is closed to new replies.

## Tags

 * [html](https://wordpress.org/support/topic-tag/html/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [David Ollenberger](https://wordpress.org/support/users/david-ollenberger/)
 * Last activity: [15 years, 3 months ago](https://wordpress.org/support/topic/adding-html-with-javascript-in-a-post/#post-1943505)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
