width attribute for image (JavaScript 1.1)

Width (in pixels) of the image.

Values

Example
No example available.

Examples having uses of JavaScript attribute 'width'

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.
2 votes
13k views

JavaScript Keywords list

JavaScript has many keywords some of them are currently in use and some of them are reserved for future use. We can not use the keywords for our general purpose.
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.
1 votes
12k views

CSS nth-child

The nth child selector is used to select the specified element of the page.
2 votes
12k views

CSS Shadow

CSS shadow work with different elements like box shadow, text shadow etc.
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.
2 votes
11k views

jQuery - Get CSS information

Using the css property we can get the simple CSS property value of an attribute.
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
11k views

CSS 2D Transform

CSS3 transform property allows us to scale, rotate, spin, stretch, and turn elements.
2 votes
11k views

Html Textbox

The contents are interpreted as text only; HTML markup is ignored. The user can type (theoretically) unlimited amounts of text into the textarea field. In reality the browser sets the limit.
1 votes
10k views

HTML5 Drag and Drop

Now HTML 5 came up with a Drag and Drop (DnD) API that brings native DnD support to the browser making it much easier to code up. HTML 5 DnD is supported by all the major browsers like Chrome, Firefox 3.5 and Safari.
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.
4 votes
10k views

jQuery Hide & Show

With jQuery, you can hide and show HTML elements with the hide and show methods
1 votes
10k views

HTML5 canvas

The <canvas> tag is used to draw graphics, on the fly, via scripting (usually JavaScript). The <canvas> tag is only a container for graphics, you must use a script to actually draw the graphics.
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.
1 votes
10k views

HTML Image

Images with title and borders
10 votes
10k views

HTML5 Video

The HTML5 <video> element also has methods, properties, and events and methods for playing, pausing, and loading, for example. Properties (e.g. duration, volume, seeking) that you can read or set. There are also DOM events that can notify you, for example, when the <video> element begins to play, is paused, is ended, etc.
2 votes
10k views

jQuery Animate Introduction

jQuery animate method is very powerful API to manipulate html elements and add animation functionality. The use of animate function is very simple.
2 votes
9k views

HTML5 svg rectangle & circle

SVG stands for Scalable Vector Graphics and it is a language for describing 2D-graphics and graphical applications in XML and the XML is then rendered by an SVG viewer. SVG is mostly useful for vector type diagrams like Pie charts, Two-dimensional graphs in an X,Y coordinate system etc.
3 votes
9k views

jQuery Basic Manipulation

jQuery provides methods to manipulate documents in efficient way. You do not need to write big code to modify the value of any element's attribute or to extract HTML code from a paragraph or division.
4 votes
8k views

jQuery ajaxStart & ajaxComplete

jQuery ajaxStart and ajaxComplete are two functions are very useful to show the graphics while the data is loading from server. The ajaxStart method works while the server fullfilling the service asked to it. The ajaxComplete method is called when the server fulfilled the request.
2 votes
6k views

CSS Animation Loop

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

HTML5 Drag and Drop between four elements

Drag and Drop magic with HTML5 using an image to drag back and forth between four <div> elements.
0 votes
2k views

jQuery Toggle

The jQuery toggle method toggles the visibility of HTML elements using the show or hide methods. Shown elements are hidden and hidden elements are shown. The speed parameter can take the following values: "slow", "fast", "normal", or milliseconds.
0 votes
2k views

HTML5 svg line & polyline

SVG stands for Scalable Vector Graphics and it is a language for describing 2D-graphics and graphical applications in XML and the XML is then rendered by an SVG viewer. SVG is mostly useful for vector type diagrams like Pie charts, Two-dimensional graphs in an X,Y coordinate system etc.
2 votes
2k views

HTML Div Layout

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

HTML Image Resize

The height and width attributes are used to specify the height and width of an image and the attribute values are specified in pixels by default. Tip: It is a good practice to specify both the height and width attributes for an image.
1 votes
2k views

HTML5 Canvas Image

The drawImage method allows you to insert other images (img and canvas elements) into your canvas context. To draw an image using HTML5 Canvas, we can use the drawImage() method which requires an image object and a destination point. The destination point is relative to the top left corner of the image.
0 votes
2k views

jQuery - Multiple CSS properties

jQuery allows to change the multiple CSS properties value at once.
0 votes
2k views

HTML5 Canvas Text

To align HTML5 Canvas text, we can use the textAlign property of the canvas context, which can be set to start, end, left, center, or right. Unless otherwise specified, the textAlign property is defaulted to left.
0 votes
2k views

HTML Table Alignment

You can create text alignment for the table by using the HTML style attribute and setting CSS attribute "text-align: right"
1 votes
2k views

CSS Animation Move

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

CSS star selector

* selector selects all the elements of the page and apply properties defined under it. If we have some properties that should be applied on all the elements, then * selector is used
0 votes
1k views

CSS Linear Transition

CSS3 transitions provide a way to control the speed of animation changes to CSS properties. Instead of having the animation changes take effect instantly, you can transition the property changes over a specified time period.
1 votes
1k views

List Columns

Unordered or ordered lists can be arranged in two, three, or more columns using nothing more than css. We force the list to break at the right point. If We want two columns, you need to float the list items left and set them at 50% width and for three columns would require a width of 33% and floated left, four would be 25% and so on.
0 votes
1k views

CSS Animation with time frames

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

HTML image link

If you want to make an image work as a link, the method is exactly the same as with texts. You simply place the <a href> and the </a> tags on each side of the image.
2 votes
1k views

jQuery Slide

The jQuery slideUp and slideDown methods gradually change the height of the selected elements.
1 votes
1k views

HTML5 canvas 2D

HTML5 canvas populated with one filled rectangle and one painted stroke.
0 votes
1k views

HTML Table Width & Height

You can specifying a table height & width by using the attributes with same name. The default values are in pixels.
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.
1 votes
1k views

CSS3 Border-radius

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.
0 votes
1k views

jQuery Replace Element

Using jquery manipulation methods, we can replace elements with another elements.
0 votes
1k views

jQuery Fade

The jQuery fade methods gradually change the opacity for selected elements.
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 border-radius 2

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

jQuery Animate

The jQuery animate method has a complete method we can supply with callback function that is fired once the animation is complete. This can be useful for stringing different animations together in sequence like this example.
0 votes
1k views

CSS Fonts

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

CSS Border

This will make a red dashed border around all HTML primary headers (H1)
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 Shadow Box

CSS box with shadow is applied with the boxes.
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 Shadows

We can apply multiple shadows of the box or text at the same HTML element.
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 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.
1 votes
1k views

CSS Display inline-block

The CSS inline-block for the display property it’s a way to make elements inline, but preserving their block capabilities such as setting width and height, top and bottom margins and paddings.
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.
0 votes
1k views

jQuery Animate Properties

jQuery animate also support different properties and multiple unit types within one animation.
0 votes
1k views

CSS Nesting

Using nesting of selectors we can specify the properties to selectors within selectors.
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 3D Transform

CSS3 allows you to format your elements using 3D transforms and here we have rotated 180 degrees around X axis.
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

jQuery - Set CSS for an element

jQuery also allows us the set the property value of the CSS.
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

CSS border-radius

You can specify the border-radius value in pixel and percentage.