In the early days of the web, HTML defined the page structure and styling was defined in attributes of the HTML tag. Web designers had to repeat styling rules within and across pages, making sites difficult to update and maintain.
CSS was created to help solve these issues by moving styling information to rules defined separately from the HTML. Designers and developers were then able organize and update styles in a single location and reuse them easily. Much of the actual layout was still done with HTML, while the CSS focused on defining size, color, or other basic visual attributes.
Today, CSS handles everything from the appearance of items to their placement on the page and even basic 2D and 3D animation. For the most part, HTML is used to indicate what an item is (for example, a paragraph, a heading, or a container, referred to as a DIV). Using just CSS, you can rearrange the look and feel of your page, regardless of the order in which elements appear in the HTML markup. You can even adjust styles or appearance based on factors such as the size or orientation of the screen.