Getting Started With CSS: What is CSS in Web Development, and how to use it?

What is CSS?

stackoverflow
stackoverflow without css

CSS Syntax:

<p>This text does not have any style applied to it.</p>
p{
font-size:40pt; //property : value
color: red;
}

How to Add CSS in HTML?

1.Inline CSS :

<p style="font-size:40pt; color: red>
This text has the <em>font-size</em> and <em>color</em> style
applied to it,
making it 20pt and blue.
</p>

2.Internal CSS:

<head>
<style>
p{
color: red;
font-size: 40pt;
}
</style>
</head>
<body>
<p> This text has the <em>font-size</em> and <em>color</em>
styles applied to it,
making it 20pt and blue.</p>
</body>

3.External CSS :

p{
color :red;
font-size:40pt;
}
<head>
<link rel="stylesheet" href="style.css">
</head>
<body>
<p>This text has the <em>font-size</em> and <em>color</em>
styles applied to it, making it 20pt and blue.</p>
</body>

--

--

--

Undergraduate, Faculty of Information Technology, University of Moratuwa

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Computer programming languages done

10 online lessons and courses to improve your coding skills

Week 1 — Beginnings

Implement Anonymous login in Ionic 5 Apps with Firebase

Implement Anonymous login in Ionic Apps with Firebase

Implementation gRPC to Domain Microservices

Java Media Framework Download Mac

Go testing at Stream

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Piriyalini Niththiyanantham

Piriyalini Niththiyanantham

Undergraduate, Faculty of Information Technology, University of Moratuwa

More from Medium

How to create a card using HTML and CSS?

MDN front-end 2

Day 2: CSS Basics

Top CSS Code vs Real Pic Challenge