Horje
How to use Style Sheets

Use simple syntax for linking to style sheets (the type attribute is not necessary):


Example of HTML Style Sheet

Example: HTML
<link rel="stylesheet" href="styles.css">

Short CSS rules can be written compressed, like this:

Example: CSS
p.intro {font-family:Verdana;font-size:16em;}

Long CSS rules should be written over multiple lines:

Example: CSS
body {
  background-color: lightgrey;
  font-family: "Arial Black", Helvetica, sans-serif;
  font-size: 16em;
  color: black;
}

Output should be:

Long CSS rules should be written over multiple lines:





Related Articles
What is HTML Style Guide HTML Style Guide
How to create Always Declare Document Type HTML Style Guide
How to Use Lowercase Element Names HTML Style Guide
How to Close All HTML Elements HTML Style Guide
How to Use Lowercase Attribute Names HTML Style Guide
How to create Always Quote Attribute Values HTML Style Guide
How to create Always Specify alt, width, and height for Images HTML Style Guide
How to create HTML Spaces and Equal Signs HTML Style Guide
How to Avoid HTML Long Code Lines HTML Style Guide
How to create HTML Blank Lines and Indentation HTML Style Guide
How to create Never Skip the <title> Element HTML Style Guide
What is Omitting <html> and <body> HTML Style Guide
What is Omitting <head> HTML Style Guide
How to Close Empty HTML Elements HTML Style Guide
How to Add the lang Attribute HTML Style Guide
What is Meta Data HTML Style Guide
How to Set The Viewport HTML Style Guide
How to set HTML Comments HTML Style Guide
How to use Style Sheets HTML Style Guide
How to load JavaScript in HTML HTML Style Guide
How to access HTML Elements with JavaScript HTML Style Guide
How to Use Lower Case File Names HTML Style Guide
What is File Extensions HTML Style Guide
What is the Differences Between .htm and .html? HTML Style Guide
What is Default Filenames HTML Style Guide

Single Articles
Example of HTML Style SheetHTML Style Guide
Short CSS rules can be written compressed, like this:HTML Style Guide
Long CSS rules should be written over multiple lines:HTML Style Guide

Read Full:
HTML Style Guide
Category:
Web Tutorial
Sub Category:
HTML Style Guide
Uploaded:
1 year ago
Uploaded by:
Admin
Views:
83


Reffered: https://www.w3schools.com/html/html5_syntax.asp

Share on: