0% found this document useful (0 votes)
14 views

Styling With CSS

CSS

Uploaded by

gaitanalysis123
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Styling With CSS

CSS

Uploaded by

gaitanalysis123
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Styling with CSS

Introduction to CSS
CSS Types
Amit Dua
HTML Links
Other Joins
Use Cases and Best Practices
Introduction to CSS

CSS stands for Cascading Style Sheets.

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!

Source: https://www.freepik.com/free-photo/man-giving-business-presentation-using-high-technology-digital pen_15665031.htm#query=business%20growth&position=10&from_view=search


CSS Types

Using CSS
CSS can be added to HTML documents in 3 ways:

● Inline - by using the style attribute inside HTML elements


● Internal - by using a <style> element in the <head> section
● External - by using a <link> element to link to an external CSS file

Inline CSS
Faculty
An inline CSS is used to apply a unique style to a single HTML element.

An inline CSS uses the style attribute of an 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:

Source: https://www.freepik.com/free-photo/man-giving-business-presentation-using-high-technology-digital pen_15665031.htm#query=business%20growth&position=10&from_view=search


CSS Types

Internal CSS
An internal CSS is used to define a style for a single HTML page.

An internal CSS is defined in the <head> section of an HTML page, within a


<style> element.

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:

Source: Font: Arial, Font Size: 8 pts


CSS Properties

CSS Colors, Fonts and Sizes


Here, we will demonstrate some commonly used CSS properties. You will learn
more about them later.
The CSS color property defines the text color to be used.
The CSS font-family property defines the font to be used.
The CSS font-size property defines the text size to be used.
Example

Faculty

Source: Font: Arial, Font Size: 8 pts


HTML Links
HTML Links - Hyperlinks
HTML links are hyperlinks.

You can click on a link and jump to another document.

When you move the mouse over a link, the mouse arrow will turn into a
little hand.

Faculty

Source: Font: Arial, Font Size: 8 pts


HTML Links
HTML Link Colors
By default, a link will appear like this (in all browsers):
● An unvisited link is underlined and blue
● A visited link is underlined and purple
● An active link is underlined and red
You can change the link state colors, by using CSS:

Faculty

Source: Font: Arial, Font Size: 8 pts


Faculty

Source: Font: Arial, Font Size: 8 pts


Thank You!

You might also like