How-to articles, tricks, and solutions about RULE

How and When to Use !important Rule in CSS

Learn how and why to use the !important rule in your CSS styles. See what cases are recommended and where is the right place to use it.

How and When to Write Comments in Javascript

There are 2 types of JavaScript comments: single-line and multi-line. See when to use them with examples, and also use comments to prevent execution when testing alternative code.

How to Add and Use CSS Comments

A CSS comment is used to give explanatory information to the code or to prevent the browser from trying to interpret particular parts of the style sheet.

How to Add Image in the Title Bar

Make your website look more attractive by using favicons in the title bar. See how favicons are created and find more information about them.

How to Add Non-Standard Fonts to a Website

In this tutorial, you can find some methods to make the design of your website attractive using unique fonts. See how you can use the @font-face rule property.

How to Insert Video in HTML

See how to use <video> and <iframe> tags instead of the <embed>, <frame> and <object> tags. Learn how to set video autoplay. Practice with examples.

How to Maintain the Aspect Ratio with CSS

Very often developers want to create a div element, that can change its width/height as the window width changes. That can be done by maintaining the aspect ratio of the element.

How to Override !important

It is possible to override !important, although it isn’t recommended to use !important at all. But you can override the !important rule with another !important.

How to Override CSS Styles

How CSS overriding works, what is the cascading order and inheritance, what are the priorities and some tricks to override them.

How to Resize Background Images with CSS3

Learn about the ways of resizing and creating responsive background images. Use the CSS background-size property for that purpose. See examples.

How to Style a Horizontal Line

Learn the ways of styling and have attractive horizontal lines: how to change color and size, set images as horizontal lines and a pack full of various kinds of <hr> examples.