Having the best site will not work if nobody finds it. As I said, the main purpose of search engine optimization (SEO) is to make your site attractive to search engines. Both page optimization and off-page optimization serve for better search visibility and, therefore, help you get a higher ranking on Google. Search engine optimization is divided into two basic areas: optimization on the page and off the page. Optimization on the page refers to the elements of the website that comprise a web page, such as HTML code, text content, and images. Off-page optimization refers, predominantly, to backlinks (links pointing to the site that is being optimized, from other relevant websites)
On-Page Optimization: The optimization on the page includes the factors that affect the ranking of your website in the search engines. These elements can include codes, keywords, and meta tags. Page optimization also includes changes and adjustments to alt images and tags, as well as a growing / decreasing keyword density that helps determine the rank of your website with respect to your competitors. Being totally under the management of a webmaster, the optimization factors on the page can be easily changed.
Off-Page Optimization : Contrary to optimization on the page, off-page optimization requires a continuous implementation effort since these factors are not under the webmaster's supervision. Off-page optimization factors include page rank and link construction. These are increased through the execution of strategies such as the publication of guests, the marketing of articles, etc.