Skip to content

Instantly share code, notes, and snippets.

@saipraveen-a
Last active October 13, 2020 11:25
Show Gist options
  • Save saipraveen-a/81ecd96c8f1ed3cf48388c52e40171b9 to your computer and use it in GitHub Desktop.
Save saipraveen-a/81ecd96c8f1ed3cf48388c52e40171b9 to your computer and use it in GitHub Desktop.
Inline CSS Basics
<html>
<head>
<title>Introduction to CSS</title>
</head>
<body>
<!--
#42f4df
#f77002
#13a351
rgb(206, 105, 72)
rgb(229, 0, 255)
hsl(264, 100%, 30%)
-->
<h1 style="font-size: 70px; color: #42f4df;">Cascading Style Sheets</h1>
<p>We use CSS to add style to our HTML documents.</p>
<p>There are a few different ways to add CSS to a document, but for time being we'll be using <em>inline</em> CSS.</p>
<h2>Inline CSS</h2>
<p>Inline CSS is written directly in our HTML using a style attribute.</p>
<p>We can style any element using inline styles, from the body to headings and paragraphs, <a href="#">as well as links</a> and strong and em tags too!</p>
</body>
</html>
<html>
<head>
<title>Introduction to CSS</title>
</head>
<body>
<h1 style="font-size: 70px; color: red;">Cascading Style Sheets</h1>
<p>We use CSS to add style to our HTML documents.</p>
<p style="color: blue">There are a few different ways to add CSS to a document, but for time being we'll be using <em>inline</em> CSS.</p>
<h2 style="background-color: purple; color: white;">Inline CSS</h2>
<p>Inline CSS is written directly in our HTML using a style attribute.</p>
<p>We can style any element using inline styles, from the body to headings and paragraphs, <a href="#">as well as links</a> and strong and em tags too!</p>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment