CSS was first proposed in 1994 by Hakon Wium Lie at CERN to define styles and formatting for HTML elements. It was created to solve styling problems in HTML 4 and won out over other proposed styling languages. There are three ways to insert CSS styles into an HTML document: inline, internal, and external stylesheets. Inline styles are applied directly to elements, internal styles are defined in the <head> using <style> tags, and external styles are linked via <link> tags and stored in an external .css file.