DO YOU KNOW ABOUT CSS?
WE WILL START THE BLOG WITH A TABLE ABOUT FONTS,,JUST HAVE A LOOK OVER THE TABLE AND START READING FROM ""ABOUT CSS""'

DO YOU KNOW ABOUT CSS?

  • WE WILL START THE BLOG WITH A TABLE ABOUT FONTS,,JUST HAVE A LOOK OVER THE TABLE AND START READING  FROM ""ABOUT CSS""

No alt text provided for this image

No alt text provided for this image

  • CSS stands for Cascading Style Sheets
  • CSS describes how HTML elements are to be displayed on screen, paper, or in other media
  • CSS saves a lot of work. It can control the layout of multiple web pages all at once
  • External stylesheets are stored in CSS files

No alt text provided for this image

CSS Syntax


The selector points to the HTML element you want to style.

The declaration block contains one or more declarations separated by semicolons.

Each declaration includes a CSS property name and a value, separated by a colon.

Multiple CSS declarations are separated with semicolons, and declaration blocks are surrounded by curly braces.

EXAMPLE-?

p {

  color: red;

  text-align: center;

}

YOU CAN ADD THE DESIGN USING CSS

CSS Background Color

You can set the background color for HTML elements:

Hello World.


Example

<h1 style="background-color:DodgerBlue;">Hello World</h1>

<p style="background-color:Tomato;">Lorem ipsum...</p>

USE POSITION,PADDING ACCORDINGLY OTHERWISE YOUR WEBSITE WILL HAVE A VIBE LIKE THESE OLD MAN.

No alt text provided for this image

Margins are used to create space around elements, outside of any defined borders.

This element has a margin of 70px.

CSS Margins


The CSS margin properties are used to create space around elements, outside of any defined borders.

With CSS, you have full control over the margins. There are properties for setting the margin for each side of an element (top, right, bottom, and left).

Margin - Individual Sides

CSS has properties for specifying the margin for each side of an element:

  • margin-top
  • margin-right
  • margin-bottom
  • margin-left

All the margin properties can have the following values:

  • auto - the browser calculates the margin
  • length - specifies a margin in px, pt, cm, etc.
  • % - specifies a margin in % of the width of the containing element
  • inherit - specifies that the margin should be inherited from the parent element



CSS Padding

The CSS padding properties are used to generate space around an element's content, inside of any defined borders.

With CSS, you have full control over the padding. There are properties for setting the padding for each side of an element (top, right, bottom, and left).

Padding - Individual Sides

CSS has properties for specifying the padding for each side of an element:

  • padding-top
  • padding-right
  • padding-bottom
  • padding-left

All the padding properties can have the following values:

  • length - specifies a padding in px, pt, cm, etc.
  • % - specifies a padding in % of the width of the containing element
  • inherit - specifies that the padding should be inherited from the parent element

Note: Negative values are not allowed.

Example

Set different padding for all four sides of a <div> element:  

div {

 padding-top: 50px;

  padding-right: 30px;

  padding-bottom: 50px;

  padding-left: 80px;

}

CSS Height, Width and Max-width

The CSS height and width properties are used to set the height and width of an element.

The CSS max-width property is used to set the maximum width of an element.

This element has a height of 50 pixels and a width of 100%.


CSS Setting height and width

The height and width properties are used to set the height and width of an element.

The height and width properties do not include padding, borders, or margins. It sets the height/width of the area inside the padding, border, and margin of the element.

CSS height and width Values

The height and width properties may have the following values:

  • auto - This is default. The browser calculates the height and width
  • length - Defines the height/width in px, cm etc.
  • % - Defines the height/width in percent of the containing block
  • initial - Sets the height/width to its default value
  • inherit - The height/width will be inherited from its parent value

BOX MODEL......


The CSS Box Model

In CSS, the term "box model" is used when talking about design and layout.

The CSS box model is essentially a box that wraps around every HTML element. It consists of: margins, borders, padding, and the actual content. The image below illustrates the box model.

CSS has the following outline properties:

  • outline-style
  • outline-color
  • outline-width
  • outline-offset
  • outline
  • FONTS.......

CSS Font Style


Font Style

The font-style property is mostly used to specify italic text.

This property has three values:

  • normal - The text is shown normally
  • italic - The text is shown in italics
  • oblique - The text is "leaning" (oblique is very similar to italic, but less supported)

Example

p.normal {

  font-style: normal;

}


p.italic {

  font-style: italic;

}


p.oblique {

 font-style: oblique;

}


Font Weight

The font-weight property specifies the weight of a font:

Example

p.normal {

 font-weight: normal;

}


p.thick {

 font-weight: bold;

}

Font Variant

The font-variant property specifies whether or not a text should be displayed in a small-caps font.

In a small-caps font, all lowercase letters are converted to uppercase letters. However, the converted uppercase letters appears in a smaller font size than the original uppercase letters in the text.

Example

p.normal {

  font-variant: normal;

}


p.small {

 font-variant: small-caps;

}

HERE IS SOME TABLES ON FONT-WEIGHT AND FONT-STYLE..................

No alt text provided for this image
No alt text provided for this image
No alt text provided for this image

One of the many reasons I love being on LINKDLIN is how easy it is to spin up series like these. All we did was toss up a category-specific template file and slapped on a little custom CSS. That gives the posts a cool landing page all to themselves, but are still part of the rest of the “flow” of the SITE.

THANK YOU FOR READING THE BLOG ON CSS.

No alt text provided for this image

Nice work🔥

Like
Reply

To view or add a comment, sign in

More articles by Moumita Podder

  • UI/UX-color schema and font-size

    The Psychology of Color in UI/UX Design Understanding the psychology of color is crucial for creating effective and…

    3 Comments
  • Designing with Webflow: A UI/UX Designer's Perspective

    As a UI/UX designer, the tools we choose can significantly impact our workflow and the quality of our final product…

    3 Comments
  • Key Points and Laws of UI/UX Design

    Hick's Law: Explanation: The time it takes for a user to make a decision increases with the number and complexity of…

  • ALL ABOUT FRAMER-MOTION??

    ANIMATION?? Animation is the rapid display of a sequence of images to create an illusion of movement. The most common…

    2 Comments
  • ALL YOU HAVE TO KNOW ABOUT SASS:->

    HEY,VIEWERS STOP!! LETS CLEAR YOUR CONFUSION ABOUT WHAT SASS IS? "SASS M TERI SASS MILI TOH MUJE SASS AAYI MUJE SASS…

    2 Comments
  • WANNA GET INTRODUCE WITH UI/UX DESIGNS??

    GIn our daily life, we came across with different kindes of people, have you ever wander that different creature in the…

    2 Comments
  • ALL you have to know about BOOTSTRAP

    What is Twitter Bootstrap? Bootstrap is a sleek, intuitive, and powerful mobile first front-end framework for faster…

    3 Comments

Insights from the community

Others also viewed

Explore topics