I would like to know how could I use appscript and use it to edit the actual HTML of the google doc. I would like my google doc to have a cool appearance and what not.
Google Apps Script can't be used to "edit the actual HTML of the google doc".
To edit a Google Docs document, use the Documents Service or the Advanced Documents Service. For details, please start by reading https://developers.google.com/apps-script/guides/docs.