Login Register
Code2night
  • Home
  • Guest Posts
  • Blog Archive
  • Tutorial
  • Languages
    • Angular
    • C
    • c#
    • C#
    • HTML/CSS
    • Java
    • JavaScript
    • Node.js
    • Python
    • React
    • Security
    • SQL Server
    • TypeScript
  • Post Blog
  • Tools
    • JSON Beautifier
    • HTML Beautifier
    • XML Beautifier
    • CSS Beautifier
    • JS Beautifier
    • PDF Editor
    • Word Counter
    • Base64 Encode/Decode
    • Diff Checker
    • JSON to CSV
    • Password Generator
    • SEO Analyzer
  1. Home
  2. Blog
  3. Chapter1 CSS

Chapter1 CSS

Date- Dec 09,2023

3657

css cascading style sheets

CSS (Cascading Style Sheets) is a style sheet language used to describe the display of an HTML or XML document. It allows web developers to control the appearance and layout of multiple web pages at once. Here's a detailed overview of some fundamental CSS properties:

1. Color:

a). color: sets the text color.

b). background-color: Sets the background color of an element.

2. Typography:

a). font-family: specifies the font of the text.

b). font-size: Sets the size of the font.

c). font-weight: controls the boldness of the text.

d). text-align: aligns text (left, right, center, justify) inside an element.

3. Layout:

a).display: Defines the display behavior of an element (block, inline, etc.).

b). width and height: sets the width and height of an element.

c). Margin: The space outside of an element is controlled by the margin.

d). padding: manages the space inside of an element.

e).float: Allows an element to be positioned to the left or right of its container.

f).position: controls the positioning method of an element (static, relative, absolute, or fixed).

4. Border and Outline:

a). border: defines the border around an element (width, style, color).

b). outline: Sets a line around the border edge of an element.

5. Background:

a). background-image: Sets an image as the background.

b). background-position: specifies the background image's initial location.

c). background-repeat: specifies how a background image should be repeated.

6. Others:

a). text-decoration: controls text decoration (underline, line-through, etc.).

b). z-index: Sets the stacking order of elements.

c). cursor: specifies the type of cursor to be displayed when hovering over an element.

Understanding and utilizing these CSS properties allows for the creation of visually appealing and responsive web pages. It's essential to learn how these properties work together to achieve the desired layout, styling, and interactivity on a website.

Example:- Here we use some property of CSS

<Html>

<head>

<style>

b{color:blue;font-family:jokerman;font-size:50;text-decoration:underline;background-image:url("image.jpg");text-transform:uppercase}

i{color:green;font-size:50;text-decoration:line-through}

u{color:red;text-decoration:overline;font-style:italic;font-weight:bold;background-color:yellow;font-size:50;text-decoration:overline}

</style>

</head>

<body>

<b>Country</b>

<p>

<i>State</i>

<p>

<u>City</u>

<p>

</body>

</html>


Result:-


S
Shubham Saini
Programming author at Code2Night — sharing tutorials on ASP.NET, C#, and more.
View all posts →

Related Articles

Anchor and Image tags in HTML
Dec 09, 2023
Countown Timer in Javascript
Sep 17, 2022
Music Player
Sep 04, 2021
Understanding CWE-79: A Comprehensive Guide to Cross-Site Scripting (XSS) and Its Prevention
Mar 19, 2026

Comments

Contents

More in HTML/CSS

  • Responsive Slick Slider 22993 views
  • How to add a WhatsApp share button on a website 19266 views
  • Slick Slider with single slide 17981 views
  • Code syntax higlighter using Prism js 13614 views
  • How to create a table with fixed header and scrollable body 6382 views
View all HTML/CSS posts →

Tags

AspNet C# programming AspNet MVC c programming AspNet Core C software development tutorial MVC memory management Paypal coding coding best practices data structures programming tutorial tutorials object oriented programming Slick Slider StripeNet
Free Download for Youtube Subscribers!

First click on Subscribe Now and then subscribe the channel and come back here.
Then Click on "Verify and Download" button for download link

Subscribe Now | 1760
Download
Support Us....!

Please Subscribe to support us

Thank you for Downloading....!

Please Subscribe to support us

Continue with Downloading
Be a Member
Join Us On Whatsapp
Code2Night

A community platform for sharing programming knowledge, tutorials, and blogs. Learn, write, and grow with developers worldwide.

Panipat, Haryana, India
info@code2night.com
Quick Links
  • Home
  • Blog Archive
  • Tutorials
  • About Us
  • Contact
  • Privacy Policy
  • Terms & Conditions
  • Guest Posts
  • SEO Analyzer
Free Dev Tools
  • JSON Beautifier
  • HTML Beautifier
  • CSS Beautifier
  • JS Beautifier
  • Password Generator
  • QR Code Generator
  • Hash Generator
  • Diff Checker
  • Base64 Encode/Decode
  • Word Counter
  • SEO Analyzer
By Language
  • Angular
  • C
  • c#
  • C#
  • HTML/CSS
  • Java
  • JavaScript
  • Node.js
  • Python
  • React
  • Security
  • SQL Server
  • TypeScript
© 2026 Code2Night. All Rights Reserved.
Made with for developers  |  Privacy  ·  Terms
Translate Page