Book Image

Web Developer's Reference Guide

By : Joshua Johanan, Talha Khan, Ricardo Zea
Book Image

Web Developer's Reference Guide

By: Joshua Johanan, Talha Khan, Ricardo Zea

Overview of this book

This comprehensive reference guide takes you through each topic in web development and highlights the most popular and important elements of each area. Starting with HTML, you will learn key elements and attributes and how they relate to each other. Next, you will explore CSS pseudo-classes and pseudo-elements, followed by CSS properties and functions. This will introduce you to many powerful and new selectors. You will then move on to JavaScript. This section will not just introduce functions, but will provide you with an entire reference for the language and paradigms. You will discover more about three of the most popular frameworks today—Bootstrap, which builds on CSS, jQuery which builds on JavaScript, and AngularJS, which also builds on JavaScript. Finally, you will take a walk-through Node.js, which is a server-side framework that allows you to write programs in JavaScript.
Table of Contents (22 chapters)
Web Developer's Reference Guide
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
9
JavaScript Expressions, Operators, Statements, and Arrays
Index

Colors


Colors can make or break a design, there are many ways to go about creating palettes and all that good stuff.

Let's take a look at HSL(a) and RGB(a).

hsl() and hsla()

The hsl() and hsla() CSS functional notations set the color in HSL/HSLa formats, and they look like this:

background-color: hsl(10, 20%, 30%);
background-color: hsla(10, 20%, 30%, .5);

Description

HSL stands for Hue, Saturation, and Lightness (or Luminance). The a stands for Alpha, which is the alpha channel, with which we declare the transparency of the color.

The hsl() function supports three or four values separated by commas. The first value is the hue, which is the base color. This is declared with a unitless number. This number represents an angle in degrees (10 = 10º) in the color wheel from 0 to 360. So, 0 and 360 are Red, 90 is Yellow-Green, 180 is Cyan, and 270 is Blue-Magenta.

The second value is the saturation, which is basically the amount of the base color. This is declared with a percentage value. 0% means there...