AgerNic.com
WEB DEVELOPER SITE, HTML, CSS, PHP, SQL

CSS Introduction Tutorial

CSS (Cascading Style Sheets) is a style sheet language used for describing the presentation of a document written in a markup language like HTML. CSS is a cornerstone technology of the World Wide Web, alongside HTML and JavaScript.

How do cascading style sheets work?

The CSS style sheets are a set of rules that are listed in a .css file and that describe what the different HTML elements of a page should look like.
The interesting thing about this is that they work with a philosophy of patterns or templates, that is, it is not necessary to specify each of the elements, but you can define rules like these two:
"Level 1 and 2 titles must be black and have a font size of 16 and 14 pixels respectively."
"The text of the paragraphs are aligned to the left, have a font size of 12 pixels and a dark gray color."
As a comparison, if you master the use of styles in Microsoft Word, you will see that this is very similar to the concept of style in Word, although CSS is infinitely more powerful than Word in all its possibilities.
CSS Tutorial example Let's see a concrete example of how the previous rules would be expressed in the language of the CSS:
<style>
body {
    background-color: lightblue;
}
h1, h2 {
color: black;
font-size: 16px;
}
h2 {
font-size: 14px;
}
p {
color: rgb(32,32,32);
text-align: left;
}
</style>
Basic properties of CSS you should know
1. Basic layout
width: Width of an element.
height: Height of an element.
vertical-align: Vertical alignment within an element.
margin: Space that is added between the element and its neighbors. You can differentiate by side (up, down, left, right).
padding: Inner fill that is added at the edges of the margin. Unlike margin, it counts for the size of the element.
float: Move the element as far as possible to the indicated side. This property is used in CSS floating positioning.
The issue of positioning in CSS is not trivial and it is convenient to study how it works before using this property.

2. Sources and text
font-family: Typeface
font-size: Font size
font-weight: Weight (normal, bold, ...)
font-style: Style (normal, italic, ...)
text-decoration: "Decorations" as underline, strikethrough, etc.
text-align: Aligning the text (left, right, etc.)
text-transform: Show a text in uppercase, lowercase or the first letter of each word in uppercase.

3. Color and backgrounds
color: Color of the element. It can be specified in different formats as predefined words (network, green, etc.) RGB or as a hexadecimal value.
background-color: Background color of the element.
background-image: Allows you to specify a background image.
background-repeat: Allows you to use an image as a mosaic in different modalities.
box-shadow: Create a shadow effect for an element.

4. Lists
list-style-image: Use the image specified as a bullet for the list.
list-style-type: Different styles of bullets and numbering styles for list items.

5. Borders
border: Add a border to an element and set some properties (thickness, line style, etc.)
border-color: Edge color.
border-style: Different styles for the edge (solid, points, etc.)
border-radius: Allows you to create rounded corners for an element.


CSS Tutorial, CSS example, CSS online courses
CSS Introduction Tutorial - css tutorial

Online Editor
ONLINE EDITOR

news templates


COLOR PICKER

news templates
This tool makes it easy to create, adjust, and experiment with custom colors for the web.


HTML Templates
news templates
Magnews2 is a modern and creative free magazine and news website template that will help you kick off your online project in style.


CSS HTML Layout
news templates
Find here examples of creative and unique website layouts.


Free CSS HTML Menu
news templates
Find here examples of creative and unique website CSS HTML menu.


CSS Scrollbar Horizontal
CSS Scrollbar in Div
CSS Scrollbar Firefox
CSS Style Scrollbar
CSS Style Text
CSS background color
CSS Div Id Class
CSS Text Wrap
CSS text-align
CSS Text Decoration
CSS Text Shadow
CSS Text Color
CSS Text Bold
CSS Text Size
CSS background image full
CSS background opacity
CSS border radius
CSS rounded corners
CSS font color
CSS Class & ID
CSS align image center
CSS align content
CSS link color
CSS Text Style
CSS Text Font Size
CSS max width &height
CSS width and height
CSS Margin
CSS Padding
CSS Border Style
CSS background
CSS in HTML
Basic Syntax of CSS
CSS Introduction
Online Editor
ONLINE EDITOR

news templates


COLOR PICKER

news templates
This tool makes it easy to create, adjust, and experiment with custom colors for the web.


HTML Templates
news templates
Magnews2 is a modern and creative free magazine and news website template that will help you kick off your online project in style.


CSS HTML Layout
news templates
Find here examples of creative and unique website layouts.


Free CSS HTML Menu
news templates
Find here examples of creative and unique website CSS HTML menu.


Upload Image, display, edit and delete i...
Login Form with Image background...
How to Create an Image with Transparent ...
Portfolio Gallery Website with filtering...
Simple pagination script PHP MySQLi...
Center Image in div...
Image Hover Overlay Fade...
Sticky image / element / div on scroll...
Responsive images...
Create rounded image in HTML CSS...
Add border around image...
Position Text Over an Image HTML CSS res...
Create a Slideshow Images Gallery...
Create a Sticky Sidebar...
Search bar using CSS HTML...
Shrink Navigation Menu on Scroll...
How to Create Accordion HTML Templates...
Dropdown menu in the navigation bar...
Responsive Top Navigation Bar with mobil...
Split horizontal navigation bar...