Code formatting the page placed in method formatPage()