Styling With CSS
Styling With CSS
Introduction to CSS
CSS Types
Amit Dua
HTML Links
Other Joins
Use Cases and Best Practices
Introduction to CSS
CSS saves a lot of work. It can control the layout of multiple web pages
all at once.
What is CSS?
Cascading Style Sheets (CSS) is used to format the layout of a webpage.
With CSS, you can control the color, font, the size of text, the spacing
between elements, how elements are positioned and laid out, what Faculty
background images or background colors are to be used, different displays
for different devices and screen sizes, and much more!
Using CSS
CSS can be added to HTML documents in 3 ways:
Inline CSS
Faculty
An inline CSS is used to apply a unique style to a single HTML element.
The following example sets the text color of the <h1> element to blue, and
the text color of the <p> element to red:
Internal CSS
An internal CSS is used to define a style for a single HTML page.
The following example sets the text color of ALL the <h1> elements (on that
page) to blue, and the text color of ALL the <p> elements to red. In addition, the
page will be displayed with a "powderblue" background color:
Faculty
External CSS
An external style sheet is used to define the style for many HTML pages.
To use an external style sheet, add a link to it in the <head> section of each
HTML page:
Faculty
When you move the mouse over a link, the mouse arrow will turn into a
little hand.
Faculty
Faculty