Stay Tuned!

Subscribe to our newsletter to get our newest articles instantly!


Introduction to CSS & Syntax – CSS

css tutorials

As we are already familiar with the concepts of HTML, we are going to use one of the finest and most popular keytool in web design. To learn CSS first, you must know the basics of HTML.

That’s why CSS is also known as the sister technology of HTML that is used style your web pages. Let us begin with the CSS basics.

CSS Introduction

  1. CSS stands for Cascading Style Sheets
  2. Extension to basic HTML
  3. Normally stored in CSS files eg. [MyStyle.CSS]
  4. Styles to web pages might be adding styles like fonts, colours, spacing to the web documents.

CSS Syntax

  • In CSS, there are two blocks: a selector block and a declaration block.
  • First selector block points to the HTML document you want to style. 
  • Similarly, the declaration block contains declarations. 
  • Different declarations have a different property name and a value.
CSS Selectors

Note: The declaration part must end with a semicolon and curly braces after each declaration.

h1 { color:#fff; border:#f00; }

Example of CSS:

body {
background-color: #333;

p {


Where to Insert CSS Code.

  1. CSS code is added inside the <head></head> section. Because it is the decoration part. It will display the change in HTML document. It doesn’t display any content so it goes at the <head></head> section.
  2. CSS needs <style></style> tag to execute the CSS code. So we always write CSS code inside <style></style> tag.

CSS Example:


<style type='text/css'>
body {background-color: #333;} 
p {font-family:"Arial";font-size:18px;} 




About Author provides tutorials related to tech and programmings. We are also setting up a community for the users and students.

You may also like

css comment and example

CSS – Comment and Example

  • September 2, 2020
CSS Comments Comments are a useful source to define our code or to make a coder understand the code applied.
Selectors, Type with Examples

CSS – Selectors, Type with Examples

  • September 2, 2020
CSS Selectors A CSS Selector is the part of the CSS ruleset that actually selects the content that you want