Tips and tricks for CSS coding

  • Tips and tricks for CSS coding: CSS is always made up of a property and a value. The property is the name of what you want to change and the value is what you want to change it to. There are hundreds of different CSS properties and values.

 

  • You separate the property from the value using a colon (:) and always use a semi-colon (;) after the value. A hyphen () is used between words.

 

  • CSS properties and values are always spelt using American English.

 

  • Values can be given in words or numbers. Common units for numerical values include pixels (px), points (pt) and percentages ( % ).

 

  • You can apply more than one CSS property to a HTML element. The best way to do this is to use a CSS class and the class attribute.

 

  • You tell your browser you are switching from HTML to CSS by using the HTML < style > tag. CSS classes are nested inside the < head > tag.

 

  • When you choose a CSS class name, it needs to begin with a dot (.) The CSS properties and values you want to apply are put inside curly braces { }

 

  • You can apply a CSS class to any HTML element using the class attribute.

Related Links:

JavaScript Glossary

Object-Oriented Programming (OOP)

Building a web-based JavaScript game

Introduction to JavaScript – Variables: Undefined

Tips and Tricks for WRITING JAVASCRIPT code

CODING WITH CSS: The style attribute

Introduction to JavaScript – Control Flow: True and False values

The background-color CSS property

My little pony learning game in VB.NET

Introduction to JavaScript – Create a Variable: const

CSS, HTML, JAVASCRIPT, Online Compiler. Code on the go by replit.it

Learn Code Introspection Python Programming

Google’s “Grasshopper” Mobile Game Teaches Adults How To Code In An Easy, Accessible Way — And It’s Free

Alignment CSS properties

Introduction to JavaScript – Control Flow: if/else Statements

Using more than one CSS property

Hello World Android app built with Android Studio

Why do most sites use cookies?

Introduction to JavaScript – Create a Variable: let

JavaScript Comparison Operators

Tips and tricks for USING THE DOM API

Build to-do list web-app with code

 

Connected through code, Choose Your Platform!

About the Author: Bernard Aybout

In the land of bytes and bits, a father of three sits, With a heart for tech and coding kits, in IT he never quits. At Magna's door, he took his stance, in Canada's wide expanse, At Karmax Heavy Stamping - Cosma's dance, he gave his career a chance. With a passion deep for teaching code, to the young minds he showed, The path where digital seeds are sowed, in critical thinking mode. But alas, not all was bright and fair, at Magna's lair, oh despair, Harassment, intimidation, a chilling air, made the workplace hard to bear. Management's maze and morale's dip, made our hero's spirit flip, In a demoralizing grip, his well-being began to slip. So he bid adieu to Magna's scene, from the division not so serene, Yet in tech, his interest keen, continues to inspire and convene.