rename your file's extension to SHTML and use the following SSI(Server Side Include) tag:
If you don't want to rename your HTM or HTML file to SHTML, use the above in combination with HTACCESS:
<!--#echo var="REMOTE_ADDR" -->
The above you put in a file called ".htaccess" exactly that name! Do not put anything infront of the period/dot for this is a special file name that requires a leading period/dot. Put the HTACCESS file within the same directory as your HTM file.
AddType text/html .shtml .html .htm
AddHandler server-parsed .shtml .html .htm
Another method is to use PHP. rename your HTM, HTML file to the PHP extension and use the following tag:
Just insert those tags within your P taqs as if they were actual HTML tags.
<?php echo $_SERVER['REMOTE_ADDR']; ?>