External Style Sheets | CSS | Tutorial 10

Share

Summary

This tutorial explains how to use external style sheets in CSS to manage and apply styles across multiple HTML files efficiently. It demonstrates creating a .css file, writing CSS rules, and linking it to HTML documents.

Highlights

Introduction to External Style Sheets
00:00:00

The video introduces external style sheets, which are .css files used to write and organize all CSS for web pages. These files can then be imported into HTML files, allowing multiple HTML files to share the same CSS.

Comparison with Inline and Internal Styling
00:00:35

Before external style sheets, two methods were used: inline styling (adding 'style' attributes directly to HTML tags) and internal styling (placing CSS within <style> tags in the HTML header). External style sheets offer a more organized approach.

Creating an External CSS File
00:01:11

The tutorial demonstrates creating a new file named 'style.css'. The file can be named anything, but it must have the '.css' extension. CSS rules are written directly within this file, similar to how they would be in internal style tags.

Linking the External CSS File to HTML
00:02:37

To link the external CSS file to an HTML page, a '<link>' tag is used in the '<head>' section of the HTML document. The 'rel' attribute is set to 'stylesheet', and the 'href' attribute points to the location of the CSS file. This effectively imports all CSS from the external file.

Benefits of Using External Style Sheets
00:04:11

A key benefit is the ability to apply the same styling across multiple HTML pages by linking the same external CSS file to each. Any changes made in the single CSS file are reflected across all linked HTML pages, ensuring consistency and ease of maintenance for website styling.

Recently Summarized Articles

Loading...