In this post, we’ll learn about styling HTML elements using CSS code, CSS stands for Cascading Style Sheet. It is used for changing the look of HTML components on the page and is very important for designing the beautiful user interface. After this tutorial, you’ll be able to learn basics about CSS and can use it in any type of web application or technology to beautify components.
CSS can be used in HTML pages in 3 ways, Here we’ll see how to style HTML elements.
Inline CSS is used to decorate a single HTML element and makes use of style attribute. See this example of styling HTML paragraph tag using inline CSS
Internal CSS is used to decorate elements in a single HTML page. It is defined between <style> – </style> tag in <head> section. See this example of using internal CSS in an HTML page
External CSS is used to decorate many HTML pages, Like for designing website’s template we use external CSS, In this we create a file with .css extension and this file contains CSS code for all page elements.
A CSS file looks like this – style.css
And this is how it is attached to the HTML page
After this information, you’ll be able to understand the basics of CSS and get an idea of using styles with any other framework.
Cheers 🙂 Happy Learning
An Oracle ACE, Blogger, Reviewer, Technical Lead working on Oracle ADF