MORE CSS PROPERTIES

MORE CSS PROPERTIES : Let’s have a look at some of the CSS properties we can add to our HTML elements to make our web pages more exciting.

As you know already, CSS is always made up of a property and a value. There are hundreds of different CSS properties and values, but here are some of the most common:

CSS property name What does it do? Example values
background-color Sets the colour of your background red; black; white; yellow;
color Sets the colour of your text red; black; white; yellow;
text-align Positions your text around
the page
left; right; center;
font-size Changes the size of your text 12px; 20pt;
float Positions your element to the left
or the right of another element
left; right; none;
height Sets the height of your element 100px; 100%;
width Sets the width of your element 100px; 100%;
border Gives your element a border 1px solid black;
margin Adds space around your element 10px;
padding Adds space inside your element 10px;

Graphics on your computer screen are made up of tiny coloured dots called PIXELS (px). You can tell your browser how many pixels you want to be in a HTML element.


Related Posts:

Alignment CSS properties

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

Building a web page with HTML tags

Build to-do list web-app with code

CODING WEB PAGES (HTML, CSS, & JavaScript)

Why do most sites use cookies?

Tips and Tricks for WRITING JAVASCRIPT code

CODING WITH CSS: The style attribute

 

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.