CSS🔹 1: 3 Basic Ways to Use CSS for Beginners




3 Basic Ways to Use CSS for Beginners❢

(Visual Studio Code)




Learn what CSS is and how to use it in 3 simple ways

—perfect for beginner bloggers and
creators customizing your site with confidence!


An elegant Persian white cat
holds a paintbrush and beautifully styles her blog❣






Today's Contents:


• What CSS is
• 3 Basic Ways to Use CSS 



🚴I am running a Blog oBlogger with the Dynamic Views theme 



Welcome, dear radiant bloggers!✨
Whether you're just starting your blogging journey or exploring something new after a long time
I'm so glad you're here. 

Today, we'll gently walk through what CSS is and learn three simple ways to use it to make your blog look just a little more polished and beautiful. 

No rushjust a friendly guide to help you grow more confident. Let's start with the first part to CSS together! 




| What CSS Is



CSS stands for Cascading Style Sheets. It's the language used to control how your blog or website looks—including layout, colors, fonts, spacing, and more. 

Think of HTML as the structure (like the walls of a house) and CSS as the decor (like the paint, furniture, and lighting). Without CSS, your blog would still work, but it would look plain and lifeless. 

Whether you're customizing a Blogger theme or building your layout from scratch, CSS is your secret sauce to make your blog visually appealing. 




| 3 Basic Ways to Use CSS


 

| Inline CSS: directly in HTML tags


⎖ What Is Inline Style in CSS?

Inline style means you apply the style directly inside an HTML tag using the style attribute. It's like putting clothes on one specific element without affecting anything else. This method is quick and easy—but not ideal for big projects. 

 

⎖ When to Use Inline Style

  • For quick styling on a single element
  • When you're testing or learning
  • Not recommended for entire page. It gets messy!



⎖ Example

Let's say you want to make a sentence orange and bold:

html
<
p style="color: orange; font-weight: bold;">Hello, AI!</p>
💤


Below is an example applying inline style using Visual Studio Code.

As an example of applying inline styles using Visual Studio Code, the paragraph-Hello, AI! is set to orange and the font to bold.
Image1. An example applying inline style using Visual Studio Code



⎖ What's happening here?

  • style="..." is added inside the <p> tag
  • color: orange; makes the text orange
  • font-weight: bold; makes the text bold


Below is what the webpage looks like with inline CSS applied.


The paragraph "Hello, AI!" appears on the webpage after applying inline CSS.
Image2. The look of the webpage after applying inline CSS 



| Internal CSS: <style> tag in the HTML document


⎖ What Is Internal Style in CSS?

Internal CSS means you write your styles inside a <style> tag, directly in your HTML documentusually in the <head> section.

Think of it as setting style rules for your whole blog post in one place, instead of repeating inline styles everywhere. It's like giving intructions not to individual computers, but to one central computer that all of them are connected to.  



⎖ When to Use Internal CSS

  • When you're styling just one page
  • Great for small blogs or tutorials
  • Easier to manage than lots of inline styles



⎖ Example

Let's say you want to make a heading darkgreen and center in text-alignment:

html
<!DOCTYPE html>
<
html lang="en">
 <
head>
  <
meta charset="utf-8">
  <
style>
   p
 {
      color: blue; font-size: 18px; 
  }

   h1
 {
      color: darkgreen; text-align: center; 
  }
   <
/style>
  </
head>
 <
body>
          <
h1>CSS Usage Methods</h1>
 </
body>
</
html>
💤



Below is an example applying internal css using Visual Studio Code.

In inline CSS, the <style> tag goes inside the <head> tag section.
Image3. An example applying internal CSS in Visual Studio Code



⎖ What's happening here?

  • The <style> tag goes inside the <head>
  • All <p> elements turn blue and larger
  • The <h1> is centered and green


Below is what the webpage looks like with inline CSS applied.

The paragraphs and heading on the webpage after applying internal CSS.
Image4. The look on the webpage after applying internal CSS





| External CSS: linked .css file


What Is External CSS File Style in CSS?

External CSS means writing all your styles in a separate .css file, then linking it to your HTML document (.html)—the cleanest and most powerful way to style your blog.

Think of it like this:
Your HTML is the structure (the bones), and your external CSS file is the outfit (the style)neatly organized in its own closet!



⎖ Why Use External CSS? 

  • Keeps your original HTML clean and readable
  • Lets you reuse the same styles across multiple pages
  • Easier to maintain and update as your blog grows 


⎖ Where to Put the CSS File?

Save your style.css in the same folder as your HTML file (or adjust the href path accordingly). On Google Blogger, you'd usually insert external CSS in the theme's HTML or use the "ADD CSS" section in the theme designer.



⎖ Example

1. Create an HTML document (.html) like:

  • Create a new folder called 'testCSS' on your computer or wherever you want
  • Open the folder in Visual Studio Code
  • Create a new folder called 'css' under the testCSS folder
  • Create a new HTML document called 'externalCSS.html' under the css folder 
  • Fill it with the following content

html 

<!DOCTYPE html>
<html>
<head>
     <meta charset="utf-8">
</head>
<body>
     <h1>Hello from External CSS</h1>
     <p>This paragraph is styled using an external CSS file.</p>
     <p class="point">This text is highlighted using class="point".</p>      
</body>
</html>
💤


🎯 TIP

In HTML, class="point" assigns the element to a CSS class named .point. It tells the browser "Apply the styles defined in the .point class to this element."


2. Create a CSS file (.css) like:

  • Create a new CSS file 'style.css' under the 'css' folder (select the css folder from the left menu, right-click, and select New File)
  • Fill it with the following content

Let's say it's called style.css

CSS

/* style.css */
body
 {
      background-color: #f9f9f9;
      font-family: Arial, sans-serif;
}

h1  {
      color: #ff6600
      text-align: center;
 } 

{
     color: #333;
     font-size: 16px;
 }

.point  {
            background: tomato;
 }
💤 


🎯 TIP

In CSS, .point is a class selector. It targets any HTML element that has the class name ".point". It's just a custom class name. You can name it anything (like .highlight, .notice, etc.) depending on what the style is for. 



3. Link the style.css file in your HTML file using the <link> tag like:

<link rel="stylesheet" href="css/style.css">

How to link that style.css file from your HTMl file by applying a <link> tag within the <head>tag section.>
Image5. How to link that style.css file in your HTML file using the <link> tag



The above <link> tag indicates that there is a style.css file inside the css folder. And the <link> tag goes in the <head> tag section. 





🎯 Secret TIP

Personally, I like to save frequently used CSS styles in the HTML view of my drafts, adding titles to them so I can easily find and reuse them when needed. 




4. The Look on the webpage after applying external CSS.





Congratulations (╹ڡ╹)


Did you enjoy in this post? I hope this post helped you understand CSS a little more clearly and made things feel less intimidating. If you're new to blogging or just starting to learn how all of this works—please know you're amazing.

Learning something new, especially something technical like CSS, takes time and practice. It's okay to go slow, make mistakes, and revisit things as often as you need. Every step you take is progress

Whether you're a beginner blogger or a curious lifelong learner, I'm cheering you on. Keep learning, keep creating, and most of all have fun with your blog. You've got this! 



Next Post ➤ Coming Soon




 ⛄🦌 ⛄🎁




Posted by Ayul














Post a Comment

Previous Post Next Post