
- Javascript Basics Tutorial
- Javascript - Home
- Javascript - Overview
- Javascript - Syntax
- Javascript - Enabling
- Javascript - Placement
- Javascript - Variables
- Javascript - Operators
- Javascript - If...Else
- Javascript - Switch Case
- Javascript - While Loop
- Javascript - For Loop
- Javascript - For...in
- Javascript - Loop Control
- Javascript - Functions
- Javascript - Events
- Javascript - Cookies
- Javascript - Page Redirect
- Javascript - Dialog Boxes
- Javascript - Void Keyword
- Javascript - Page Printing
- JavaScript Objects
- Javascript - Objects
- Javascript - Number
- Javascript - Boolean
- Javascript - Strings
- Javascript - Arrays
- Javascript - Date
- Javascript - Math
- Javascript - RegExp
- Javascript - HTML DOM
- JavaScript Advanced
- Javascript - Error Handling
- Javascript - Validations
- Javascript - Animation
- Javascript - Multimedia
- Javascript - Debugging
- Javascript - Image Map
- Javascript - Browsers
- JavaScript Useful Resources
- Javascript - Questions And Answers
- Javascript - Quick Guide
- Javascript - Functions
- Javascript - Resources
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 Articles
- 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
- Create editable content in an HTML document
- Include meta data in an HTML document
- How to include another HTML file in an HTML file?
- How to add copyright symbol to your HTML document?
- How to create an HTML Document?
- How do we upload external file on a website using HTML forms?
- How to include an external JavaScript inside an HTML page?
- How to indicate long quotations in an HTML document?
- How do I put a jQuery code in an external .js file?
- How to define the URL of an external script file in HTML5?
- How do we include a section in an HTML document?

Advertisements