Member-only story

How to start building CSS for your website?

Krish S Bhanushali
codeburst
Published in
5 min readJan 18, 2018

It is always a huge concern about building your CSS with proper classes and reduced duplicity. In this post, you would be reading about how you set up your CSS according to your own needs when you start to build your own website/portfolio/application.

There are a number of practices which are held while writing HTML and CSS together. Some use the practice of writing HTML first, and then CSS. Some write CSS first and then HTML or some write both along each other.

The practice which I use, is writing the basic HTML and CSS first. Meaning, writing the layout/structure of HTML page and then writing the basic CSS for it i.e., for body tag, h1 tag, h2 tag, p tag, font-face, etc.

But lets not dwell in the air, but focus on keeping the ways straight enough. Lets dive into each of them deeper one by one.

Body tag

It is always the best practice to start building your CSS with the body tag. Keeping the margin 0 and padding 0, assigning the font-family, font-size, line-height, background-color, font color and font-weight. For example :-

body {
font-family: "Libre Baskerville",Arial,sans-serif;
font-size:
16px;
line-height:
1.5;
color: #3b3a3a;
font-weight:
300;
margin:
0;
padding:
0;
}

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Published in codeburst

Bursts of code to power through your day. Web Development articles, tutorials, and news.

Written by Krish S Bhanushali

Analytic problem solver by birth and programmer by choice. Motivator and spiritual. Portfolio: www.krishbhanushali.me

Responses (2)

What are your thoughts?

Simple and concise.

--

Very helpful article . Thank u krish .

--