Bagaimana menggunakan external CSS style

External stye sheet sangat menguntungkan ketika kita memiliki lebih dari satu page yang membutuhkan style yang sama. Kebanyakan website sekarang menggunakan multiple pages dan mereka harus menggunakan style yang sama untuk bisa tetap konsisten. kodenya seperti berikut :
<!DOCTYPE html>

 
 
 SecondPage.html
 
 
 
 

Second Page

This page uses the same style as externalStyle.html.
 
Keuntungan menggunakan external CSS
  • One style sheet can control many pages: Generally, you have a large number of different pages in a website that all share the same general style. You can define the style sheet in one document and have all the HTML files refer to the CSS file.
  • Global changes are easier: If you’re using external styles, you make a change in one place and it’s automatically propagated to all the pages in the system.
  • Separation of content and design: With external CSS, all the design is housed in the CSS, and the data is in HTML.
  • Easy upgrades: Because the design parameters of the entire site are defined in one file, you can easily change the site without having to mess around with individual HTML files.
 
https://www.dummies.com/web-design-development/html5-and-css3/how-to-use-an-external-style-sheet-for-html5-and-css3-programming/ 

No comments:

Post a Comment