class attribute for button (HTML4 & HTML5)

CSS class assigned to the element.

Values

(Default Value: no default value)

Result from the Online TryIt-Editor
chrome 1.0safari 1.0Firefox 1.0ie 3.0opera 4.0

Examples having uses of html attribute 'class'

3 votes
14k views

CSS Animation

CSS3 animations make it possible to animate transitions from one CSS style configuration to another. Animations consist of two components: A style describing the animation and a set of keyframes that indicate the start and end states of the animation's CSS style, as well as possible intermediate waypoints along the way.
1 votes
13k views

CSS Linear Gradient

The CSS linear-gradient function creates an effect which represents a linear gradient of colors on the element. The Top to Bottom gradient effects the element from top to bottom and the left to right gradient effects the element from left to right.
0 votes
13k views

HTML Table Layout

Table layout styled with CSS attributes and managed by HTML class attribute.
0 votes
12k views

CSS Transition

CSS3 transitions are effects that let an element gradually change from one style to another. To do this, you must specify the effect and the duration.
3 votes
11k views

CSS Padding & Margin

A margin is the space outside of the element, whereas padding is the space inside the element.
4 votes
11k views

CSS Rounded Corners

The CSS3 border-radius property allows web developers to easily utilise rounder corners in their design elements, without the need for corner images or the use of multiple div tags or JavaScript.
0 votes
10k views

CSS Dimension with pixel

The dimension property of the CSS allows us to manage the height and width of the HTML elements.
0 votes
10k views

CSS Text Align

This example uses an Internal CSS Style Sheet to make the heading centred, along with the main text. It moves the example date to the right hand side.
0 votes
10k views

CSS Border Style

In this example two lines of text have been bordered using thick and medium widths. They have a "border-style" of "solid" to ensure the borders display correctly.
0 votes
10k views

CSS3 Multi Columns Basic

CSS multi columns property builds on the Box model module [no public working draft yet] and adds functionality to flow the content of an element into multiple columns.
0 votes
10k views

CSS Flexible Box Basic

The flexible box layout gives us a way of creating flexible boxes. It lets us align and distribute boxes vertically and horizontally as well as have boxes flex to use all available space. You can also display the elements in reverse order compared to how they are ordered in the markup.
0 votes
10k views

CSS Floating Images

In this example, four thumbnails are floating below heading. Try to resize the browser window to see how the float to the right.
0 votes
10k views

CSS Text Color

Shows how to set text colors on different elements.
4 votes
9k views

CSS Attributes

In addition to setting a style for a HTML element, CSS allows you to specify your own selectors called "id" and "class". "id" and "class" are attributes to most HTML elements.
2 votes
6k views

CSS Animation Loop

This allows us to animated the element movement infinitly.
0 votes
2k views

CSS Ease in and Ease out

CSS3 transitions are effects that let an element gradually change from one style to another. To do this, you must specify the effect and the duration.
2 votes
2k views

HTML Div Layout

The HTML div element is a block level element used for grouping HTML elements.
0 votes
2k views

CSS @font-face with Multiple Fonts

CSS3 allows user to use the font that are even not installed on his/her own computer. The fonts that that resides on the server can be used by CSS3 @font-face.
1 votes
2k views

jQuery Focus & Change Event

jQuery events can be used to register behaviors to take effect when the user interacts with the browser, and to further manipulate those registered behaviors.
1 votes
2k views

CSS Animation Move

This allows us to move the animated element to move from one place to another.
1 votes
1k views

CSS Class and ID

CSS class selector is defined using "."(dot) for example ".class1". The class selector can be used more than one in same document. The ID selector is defined using "#" (hash), for example "#id1". The id selector can only be used once in same document.
0 votes
1k views

CSS Animation with time frames

This animation allows to add time to animation effect.
1 votes
1k views

jQuery Selectors Advanced

The jQuery nth-child is used to select all elements that are ntg-child of of their parent. The nth-child(n) is “1-indexed”, meaning the “n” is counting starts at 1. Because jQuery's implementation of :nth-child(n) is strictly derived from the CSS specification, the value of n is "1-indexed", meaning that the counting starts at 1. For all other selector expressions, however, jQuery follows JavaScript's "0-indexed" counting.
0 votes
1k views

CSS Display block

CSS display block property displays the HTML elements in the block.
0 votes
1k views

jQuery Mouse Event

jQuery mouse events are events that have to do with actions of the mouse. These can be a click, double-click, mouse down and more. Mouse events can be used in two different ways.
1 votes
1k views

CSS Radial Gradient

The CSS radial-gradient function creates a effect which represents a gradient of colors radiating from an origin. Radial gradients are defined by their origin and the angle, orientation, and type, a circle or an ellipse of the spreading shape.
0 votes
1k views

jQuery Create Element

jQuery provides methods to manipulate documents in efficient way. Using jquery manipulation methods, we can insert element in given document. Like here we add a new element before the blue square.
1 votes
1k views

jQuery User Controlled Animation

jQuery Animate can function supports animation in different directions
0 votes
1k views

CSS Absolute Position

The HTML div element is a block level element is also nice to use for positioning around on the web page. In this example were two small boxes is position relative to the larger box.
0 votes
1k views

CSS Radial Gradient at center

The CSS radial-gradient function creates a effect which represents a gradient of colors radiating from an origin. Radial gradients are defined by their origin and the angle, orientation, and type, a circle or an ellipse of the spreading shape.
0 votes
1k views

CSS Transform and Rotate

CSS Transforms offers you the possibility to scale, rotate, reposition and skew an element through CSS. We can now combine this with CSS Transitions to create a nice example that will both scale and rotate an element when hovered
0 votes
1k views

CSS border-radius 2

You can specify the border-radius value in pixel and percentage.
0 votes
1k views

CSS and Selector

By using the style element you can map CSS attributes to class attribute used on HTML elements. For advanced examples on this topic please see advanced HTML.
0 votes
1k views

CSS Color

Colors can be applied to any HTML element. Like div, text, body ,paragraph etc.
0 votes
1k views

CSS Fonts

Using CSS font properties we can set the color, hight , width ,size and alignment of the Font.
1 votes
1k views

CSS Border

Using CSS border we can set style, color, width of the borders of an HTML element.
0 votes
1k views

CSS Container Margin

CSS margin and padding properties are used to spacing out the elements. A margin is the space outside of the element, whereas padding is the space inside the element.
1 votes
1k views

CSS Multiple Classes

It is possible to add more than one class to an HTML element. Classes are written within the same attribute, with spaces separating each class. The advantage of multiple classes is that you can write a CSS rule to select either of the classes – and they both affect the same element.
0 votes
1k views

CSS on Text

Use CSS to set the font of a text
0 votes
1k views

CSS Font

This example shows you three lines of text, two controlled by a class. Each class has a different font applied. The fonts are applied using an internal Style Sheet. The "Example Fonts" is using a simple <h1> tag.
0 votes
1k views

CSS Relative Position

Relative position specifies the position of the element within the area. It will not go outside of the containing area.In the given example the containing area is body of the page.
0 votes
1k views

CSS Border Color

This example two lines of text have been bordered using red and green colouring. They have a "border-style" of "solid" to ensure the borders display correctly. Without setting the style, the color change will not work.
0 votes
1k views

CSS Margin

This example shows you how to use an internal CSS StyleSheet to apply margin options. The top line has no margin, whereas the second line of text has a margin on both sides of 50px.
0 votes
1k views

CSS Fixed Position

This property makes the element fix on the page. Scrolling will not effect the position of element Please ensure the browser window is small enough for a scrollbar to appear, this fully demonstrates the fixed positioning.
0 votes
1k views

CSS Padding

This example shows you how to use an internal CSS Style Sheet to apply padding options. The top line of text has no padding, whereas the second line of text has 25px padding at the top and bottom, and 50px padding on either side.
0 votes
1k views

CSS Dimension with max width and min height

This property allows us to define the maximum and minimum hight and width the elements of the HTML.
0 votes
1k views

CSS Container Padding

CSS padding is used to make the gap between the container and the text.
1 votes
1k views

CSS Float

It can sometimes be useful to have some text be aligned to the left and some text be aligned to the right on the same line. For example, in a footer, where you might want to have copyright info on the left and webmaster info on the right.
0 votes
1k views

CSS Arbitrary Linear Gradient

This gradient has arbitrary stops according to our needs.
1 votes
1k views

jQuery Remove Element

Using jQuery manipulation methods, we can remove elements.
0 votes
1k views

CSS Flexible Box Extended

The flexible box model has box-pack nad box-align properties. The box-pack property allows to fit the boxes that are in horizontal manner. The box-align property allows to fit the boxes that are in vertical manner. The box-ordinal-group property allows to set the order of the boxes manually.
0 votes
1k views

CSS Text Align

Text can be centered, or aligned to the left or right, or justified. When text-align is set to "justify", each line is stretched so that every line has equal width, and the left and right margins are straight (like in magazines and newspapers).
0 votes
1k views

CSS Floating Text

CSS floating allows us to push an element either left or right.
0 votes
1k views

CSS Border Width

In this example two lines of text we borders at 15px and 10px width. They have a "border-style" of "solid" to ensure the borders display correctly.
0 votes
1k views

CSS Absolute Position

CSS position property allows us to set an absolute position to an element (relative to it's environment). We can set the position of an element using the top, right, bottom, and left properties.
0 votes
1k views

jQuery DOM Traversing and filtering

Most of the JQuery Traversal Methods do not modify the jQuery object and they are used to filter out elements from a document based on given conditions. The filter( selector ) method can be used to filter out all elements from the set of matched elements that do not match the specified selector(s).
0 votes
1k views

CSS Vertical Align

The vertical-align property sets the vertical alignment of an element.
0 votes
1k views

CSS Font Attributes

Using text properties of CSS we can set the height, width , color of the text
0 votes
1k views

CSS Even Linear Gradient

Linear Gradient effect with even stops.
0 votes
1k views

CSS Dimension with percentage

This property allows us to define the height and width of the HTML elements in the percentage.
0 votes
1k views

CSS3 Multi Columns Extended

Multi columns property allows us to define column rule and the gap between column and column fill type.
0 votes
0 views

colorful texts

Shows how to set text colors on different elements.12345