<!DOCTYPE html>function floatRight(){document.getElementById("img1").style.cssFloat="right";}function floatLeft(){document.getElementById("img1").style.cssFloat="left";}id="img1" src="w3javascript.gif" width="100" height="132"This is a paragraph.This is another paragraph.type="button" onclick="floatRight()" value="Float right"type="button" onclick="floatLeft()" value="Float left"