

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Including an external stylesheet file in your HTML document
The <link> element can be used to include an external style sheet file in your HTML document.
An external style sheet is a separate text file with .css extension. You define all the Style rules within this text file and then you can include this file in any HTML document using <link> element.
Consider a simple style sheet file with a name new.css having the following rules:
h1, h2, h3 { color: #36C; font-weight: normal; letter-spacing: .4em; margin-bottom: 1em; text-transform: lowercase; }
Now you can include this file new.css in any HTML document as follows:
<head> <link type = "text/css" href = "new.css" media = " all" /> </head>
- Related Questions & Answers
- How to use external “.js” files in an HTML file?
- How to write JavaScript in an External File?
- How to read an external JSON file in JavaScript
- Including CSS in HTML Documents
- How to include an external JavaScript inside an HTML page?
- How to create an HTML Document?
- Create editable content in an HTML document
- Include meta data in an HTML document
- How do we upload external file on a website using HTML forms?
- How do I put a jQuery code in an external .js file?
- How to indicate long quotations in an HTML document?
- How to read an image file in external storage with runtime permission in android?
- How to write an image file in external storage with runtime permission in android?
- How to add a container for an external (non-HTML) application in HTML5
- How do we include a section in an HTML document?
Advertisements