Code2night
  • Home
  • Guest Posts
  • Tutorial
  • Languages
    • Angular
    • C
    • C#
    • HTML/CSS
    • Java
    • JavaScript
    • Node.js
    • Python
    • React
    • SQL Server
    • TypeScript
  • Post Blog
  • Tools
    • JSON Beautifier
    • HTML Beautifier
    • XML Beautifier
    • CSS Beautifier
    • JS Beautifier
    • PDF Editor
  • Register
  • Login
  1. Home
  2. Blogpost

Chapter1 CSS

Date- Dec 09,2023

3625

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 →

Comments

Tags

Swagger UI
Swashbuckle
SwashbuckleAspNetCore
Rest API
Postman
Api Testing
ITextSharp
Export to Pdf
AspNet Core
AspNet
C#
View to Pdf in Aspnet
Scheduler
Fibonacci series in Java
Display Fibonacci Series
First C# Program
What is C?
C
C Programming
CodeLobster
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 Join Us On Facebook
Code2Night

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

Panipat, India   info@code2night.com

Quick Links
  • Home
  • Blogs
  • Tutorials
  • About Us
  • Contact
  • Privacy Policy
  • Terms & Conditions
  • Guest Posts
Dev Tools
  • JSON Beautifier
  • HTML Beautifier
  • XML Beautifier
  • CSS Beautifier
  • JS Beautifier
  • PDF Editor
By Language
  • Angular
  • C
  • C#
  • HTML/CSS
  • Java
  • JavaScript
  • Node.js
  • Python
  • React
  • SQL Server
  • TypeScript
© 2026 Code2Night. All Rights Reserved.
Built with for developers