
Understanding HTML Style Sheets: Types, Usage, and Best Practices
Learn about style sheets in HTML, including what styles are, the three types of style sheets (External, Internal/Embedded, Inline), and how to use them effectively in D2L content settings. Explore examples and guidelines for creating and linking style sheets to enhance the appearance of text and graphics on your HTML documents.
Download Presentation

Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.
E N D
Presentation Transcript
Understanding HTML Style Sheets
What is a style? A style is a rule that defines the appearance and position of text and graphics. It may define the font, font size, font color, border, etc. A style sheet is a file (css extension) that is a collection of styles that describes how to display the elements of an HTML document.
Three types of Style Sheets External Style Sheets Internal or Embedded Styles Inline Styles
<link rel="stylesheet" type="text/css" href="https://elearn.nscc.edu/shar ed/Styles/D2LBasicTemplate.css" / Example 1: External style sheet and HTML file
Example 1: File after the style sheet and HTML content are linked
Internal or Embedded Styles An HTML file with embedded styles is one HTML file with the styles inserted at the top of the HTML page between <head> tags. One of the advantages is that you can move this file anywhere and the styles go with it. Head tags
Inline Styles An inline style is created when you format a selection of text; for example, selecting text and changing the color.
D2L Content Settings To set D2L so you can easily locate a document template (stylesheet), 1. Go to Content and click on Settings. 2. Check Enable HTML Templates. 3. Choose Change Path 4. Select Course Offering Files or Shared Files. 5. Select the specific folder. 6. Click on Select Path.
Create a New File Click on New and choose Create a File. Enter a title. Select a Document Template. Key directly in the editing area or paste text. When finished, click on Change Path to save the file in a specific folder. Click on Publish.
Style Sheets in D2L Any HTML file can be used as a template. An HTML file with styles that is used as a template can be saved in Manage Files inside a D2L course. There are two style sheets (HTML files with embedded styles) in the Shared Folder. When you Select a document template to access a style sheet, the file is copied and saved when the file is published with the name you assign as a title. There is no save as feature.