HOME | PHP Tutorial | CSS
facebook icon
AgerNic.com
WEB DEVELOPER SITE, HTML, CSS, PHP
PHP Tutorial

PHP forms
HTML Tutorial

CSS Tutorial

Basic Syntax of CSS - How to Code CSS

A CSS comprises of style rules that are interpreted by the browser and then applied to the corresponding elements in your document. A style rule is made of three parts: a selector, a property, and a value. CSS selectors are used to find HTML elements based on their element name as: id, class, attribute, and more.

autocar

The element Selector

The element selector selects elements based on the element name.
You can select all <h1> elements on a page like this (all elements will be left-aligned, with a green text color).

Example:
h1 {
text-align: left;
color: green;
}

The id Selector

The id selector is used to select one unique element! To select an element with a specific id, write a hash (#) character, followed by the id of the element. The style rule will be applied to the HTML element with id="unika", (in this case, #unika element will be height: 200px with a green background-color and 14 px font-size):

Example:
#unika {
height: 200px;
background-color: green;
font-size: 14px;
}

The class Selector

All the elements having that class will be formatted according to the defined rule. To select elements with a specific class, write a dot . character, followed by the name of the class. The style rule will be applied to the HTML element with class="box1", (in this case, box1 element will be height: 200px with a green background-color and 14 px font-size):

Example:
.box1 {
height: 200px;
background-color: green;
font-size: 14px;
}

Grouping Selectors

You can apply a style to many selectors how you like. Just separate the selectors with a comma as in the examples above.

Example:
h1, h2, h3, h4 { color: blue }

OK, so you've now learned about the CSS style syntax, but how do you incorporate this syntax into your website? The next lesson will show you how to incorporate CSS into your HTML webpage.

Syntax of CSS, How to Code CSS, Basic CSS Basic Syntax of CSS - How to Code CSS - css tutorial

2235. CSS Tutorial - Positioning
Attaching the fixed value of the position attribute to an HTML element, you will get a
https://tutorialehtml.com/en/css-tutorial-positioning/

3178. CSS code, Tags, Example, CSS, Editor, Online Courses, Training
Online CSS Tutorial pdf, what is CSS, Online Courses, Classes, Training, Tutorials for Beginners - agernic.com is a free interactive Code, Tags, Example, CSS, Editor, Online Courses, Training for beginners
https://www.agernic.com/css-tutorial.html

812. CSS (foreground) color - CSS tutorials - w3resource

https://www.w3resource.com/css/color/introduction.php

2709. CSS Text - CSS tutorial
EchoEcho.Com : The complete CSS tutorial
http://www.echoecho.com/csstext.htm

16. CSS3 Tutorial - An Ultimate Guide for Beginners
CSS Tutorials for Beginners - Learn the fundamentals of the latest CSS3 style sheet language in simple and easy steps and create beautifully designed website.
https://www.tutorialrepublic.com/css-tutorial/

819. CSS margin-top property - CSS tutorials - w3resource

https://www.w3resource.com/css/margin/CSS-margin-top-property.php

Your add here
PHP print() function

PHP implode() function

PHP htmlentities() function

PHP strlen() function

PHP trim() function

PHP html_entity_decode() function

PHP rtrim() function

PHP wordwrap() function

PHP htmlspecialchars_decode() function

PHP strstr() function

PHP strcmp() function

PHP explode() function

PHP ucwords() function

PHP substr() function

PHP ltrim() function

PHP define() function

SQL WHERE AND & OR multiple conditions
How to prevent sql injection in php mysqli
HTML Text Color Style
HTML Table Style
CSS align content Property - CSS align text - how to create
SQL IN Operator - example