CSS
This lesson gives a brief introduction to cascading style sheets and how they are used with HTML.
Introduction
CSS, like HTML, is not a programming language, it’s a styling language for HTML. To understand CSS, it’s worth recalling the main purpose of HTML. HTML was originally designed as a structural language, but with time and updates, it has been turned into a tool for presentation which uses fonts, colors, and other visual elements. The purpose of CSS is to restore HTML to its original status as a structural language. In other words, cascading style sheets are a way to format your page layout, text, fonts, images, and almost anything that controls the look and feel of your web page. This leaves HTML with the structural work only.
Linking CSS with HTML
There are three ways to add CSS to the HTML code.
Inline CSS
CSS is said to be added ‘inline’ when it is used in the style
attribute of HTML tags. This is inefficient and not scalable because each individual tag would have to have the CSS inserted. This method is generally never used as it is extremely impractical.
HTML Input
<h3 style ="color:blue">Blue Heading!</h3>
Get hands-on with 1400+ tech skills courses.