CSS
Cascading Style Sheets are fundamental in shaping a website’s visual presentation and layout, making it attractive and user-friendly. They operate by a set of guidelines that specify how HTML elements are displayed in a web browser. They can be used to change text size, design catchy buttons, and ensure the content adjusts fluidly to the screen size.
They are used in different forms in accordance with their scenarios and purpose. The three primary types of CSS can be listed as follows:-
Inline CSS is used directly within the HTML element using the “style” attribute. This method is encouraged for making small changes and testing purposes, not large-scale changes, as it mixes content with presentation.
Internal CSS (Embedded CSS) is written within a “style” attribute in the “head” section of an HTML document. It generally applies style to the elements of a single page.
External CSS is an efficient method for styling large websites. It keeps stylesheets separate from HTML files, favours reusability and reduces redundancy. All pages can link to the same CSS file, ensuring consistency throughout the site.