CSS Tutorial

CSS Portal

CSS (Cascading Style Sheet) is basically the scripting language. It is used for designing web pages. It is the most important web technology that is widely used along with HTML and JavaScript. CSS have file extension of .css.

A media query consists of a media type and zero or more expressions that check for the conditions of particular media features. Without the CSS3 media query, you would be unable to target particular CSS styles at particular device capabilities, such as the viewport width.

HTML tags are the building blocks of your web page. Web designers use the concept of the box as a metaphor to describe the various things that you can do to an HTML element, whether it is a single tag or several nested tags. A box can have several properties - including margins, borders, padding, width, and height - that can be influenced by CSS.

There are many ways to customize HTML forms.

You can create a table with borders or without. By default, browsers display table without borders.

Since lists are text elements, you can style them the way you style a paragraph or heading, with a customized font-family, font-size, font-weight, color, and margins.

Images on a web page are almost always one of three types: jpg, gif, or png. An HTML file tells the browser which images to place on the page and where to place them, but the images themselves aren't part of the HTML file. They are individual files that can be stored anywhere on the Internet.

Inheritance is an efficiency feature of CSS. It means you have to write far less code. An HTML page is organized into parents and children. A child element of a parent element is any element that's enclosed by the parent element.

You can style text using CSS for spacing, case, horizontal alignment, vertical alignment, and decoration.

A web page (also referred to as the document) is displayed within a browser window's viewport. Everything that you can present to the viewer is displayed in that area, although the document will require scrolling if it is larger than the viewport.

With CSS, content is separated from styling of documents. HTML is used to deliver content while CSS is used to deliver all the formatting. The basic form of style sheets contains three parts: Selector, Property, and Value.

The CSS3 transform property lets you translate, rotate, scale, or skew any element on the page. The value of the transform property is one or more transform functions, separated by spaces, which is applied in the order they are provided.

CSS3 provides the ability to create native radial and linear gradients, as well as include multiple background images on any element.

If you are introduced to the website world, you must have heard the three letter word - CSS. It is not one word, but short form of three words. The full form os CSS is Cascading Style Sheets. These are simple files with .css extension that contain some piece of code. The code determines how web pages are formatted and presented to the users.

You can add CSS to a page in three different ways.

CSS uses selectors to determine the element or elements to which a rule will be applied.

Using CSS, you can choose a font family and select font sizes and color.


Borders provide visual separation between elements on a page. You can add borders around just about anything in HTML and there are a few border styles to choose from. Borders are added with the border CSS property.

You can change the color of the background using CSS, or use a background image. Background colors and background images can be applied to the entire page or to individual elements by using the background-color property.

By default browsers style link text in blue with an underline. But you can give it a different style. Links can be styled differently depending on what state they are in. There are four links states.

The most common way to lay out a page is by establishing a grid, which is generally made up of two or more columns. The float property is the standard method for creating a grid structure of columns in most modern web designs. This is done by taking block level elements that would normally stack vertically and horizontally and floating them next to each other.

Navigation is very important for any web site. With CSS, you can transform boring HTML menus into good-looking navigation bars. As HTML, navigation bar is a standard list of links, constructed using using the <ul> and <li> elements.

Responsive web design makes web page look good using many different devices: desktops, tablets, and phones. Responsive web design uses only HTML and CSS. It is called responsive web design when you use CSS and HTML to resize, hide, shrink, enlarge, or move the content to make it look good on any screen.

CSS3 is the latest standard for CSS. It is completely backwards-compatible with earlier versions of CSS. There are many new exciting features of CSS3.

With CSS, you can give color names, hexadecimal (#FFF, or #FFFFFF for white) and RGB (Red, Green, Blue) values providing either integers (0-255) or percentages. For example, white is rgb(255, 255, 255) or rgb(100%, 100%, 100%).

With CSS3, you can add shadow to text and box elements: text-shadow and box-shadow.