To add javascript, you can use:
drupal_add_js
And similar for css:
drupal_add_css
But what if I just want to add html at the end of my page. I.e. Add a div with some text in it at the end of the page?
To add javascript, you can use:
drupal_add_js
And similar for css:
drupal_add_css
But what if I just want to add html at the end of my page. I.e. Add a div with some text in it at the end of the page?
You could write a block to do it and put the block in the colsure.
...or, probably not as recommended as the other answers, but more direct, you can add the html straight to the page.tpl.php file.
Drupal has a hook you can implement and add in whatever code you'd like to the footer of the page - hook_footer. See http://api.drupal.org/api/function/hook_footer/6
There have already beed made some good suggestions:
The easiest thing would be to add a block that you create, where you can put your custom markup. You could even create a special template for it, so you don't get your usual drupal block markup, but only what you write in the block content.
That should cover your needs:
Now if you don't want to use blocks, because you don't want the site admins to know about the block, the 2nd best thing would be:
This will basically do the same thing as above, only you have the setting in your theme, instead of adding a block. It will require more work.
You can do pretty much the same in a custom module, but it wont make much sense to do this in a module, since it's purely presentation and you are dependent on your theme anyways.