Results 1 - 20 of 32

Using dynamic styling information

The CSS Object Model (CSSOM), part of the DOM, exposes specific interfaces allowing manipulation of a wide amount of information regarding CSS. Initially defined in the DOM Level 2 Style recommendation, these interfaces forms now a specification, CSS Object Model (CSSOM) which aims at superseding it.
beginner Beginner CSSOM NeedsBeginnerUpdate

JavaScript data types and data structures

Programming languages all have built-in data structures, but these often differ from one language to another. This article attempts to list the built-in data structures available in JavaScript and what properties they have; these can be used to build other data structures. When possible, comparisons with other languages are drawn.
Beginner beginner JavaScript Types

Control flow and error handling

JavaScript supports a compact set of statements, specifically control flow statements, that you can use to incorporate a great deal of interactivity in your application. This chapter provides an overview of these statements.
beginner Beginner Guide JavaScript

Comments

Comments are used to add explanatory notes or prevent the browser from interpreting parts of the stylesheet.
beginner Beginner CSS CSS Reference

Syntax

The basic goal of the Cascading Stylesheet (CSS) language is to allow a browser engine to paint elements of the page with specific features, like colors, positioning, or decorations. The CSS syntax reflects this goal and its basic building blocks are:
Beginner beginner CSS Guide Web

Value definition syntax

A formal grammar, the CSS value definition syntax, is used for defining the set of valid values for a CSS property or function. In addition to this syntax, the set of valid values can be further restricted by semantic constraints (like, for a number to be strictly positive).
beginner Beginner CSS CSS Reference

DOM on-event handlers

The Web platform provides several ways to get notified of DOM events.  Two common styles are: the generalized addEventListener() and a set of specific on-event handlers. This page focuses on the details of how the latter work.
beginner Beginner DOM NeedsBeginnerUpdate NeedsUpdate

Functions

Functions are one of the fundamental building blocks in JavaScript. A function is a JavaScript procedure—a set of statements that performs a task or calculates a value. To use a function, you must define it somewhere in the scope from which you wish to call it.
Beginner beginner Functions Guide JavaScript

Attribute selectors

Attribute selectors select an element using the presence of a given attribute or attribute value.
Beginner beginner CSS CSS Reference Selectors

Child selectors

The > combinator separates two selectors and matches only those elements matched by the second selector that are direct children of elements matched by the first. By contrast, when two selectors are combined with the descendant selector, the combined selector expression matches those elements matched by the second selector for which there exists an ancestor element matched by the first selector, regardless of the number of "hops" up the DOM.
Beginner beginner CSS CSS Reference NeedsMobileBrowserCompatibility Selectors

Specificity

Specificity is the means by which browsers decide which CSS property values are the most relevant to an element and, therefore, will be applied. Specificity is based on the matching rules which are composed of CSS selectors of different sorts.
Beginner beginner CSS Example Guide Web

Block-level elements

HTML (Hypertext Markup Language) elements are usually either "block-level" elements or "inline" elements. A block-level element occupies the entire space of its parent element (container), thereby creating a "block." This article helps to explain what this means.
Beginner beginner Development Guide HTML HTML5 Web

Expressions and operators

This chapter describes JavaScript's expressions and operators, including assignment, comparison, arithmetic, bitwise, logical, string, ternary and more.
beginner Beginner Expressions Guide JavaScript Operators

width

The width CSS descriptor is shorthand for setting both the min-width and the max-width of the viewport. By providing one viewport length value, that value will determine both the min-width and the max-width to the value provided.
Beginner CSS Reference

Locating DOM elements using selectors

The Selectors API provides methods that make it quick and easy to retrieve Element nodes from the DOM by matching against a set of selectors. This is much faster than past techniques, wherein it was necessary to, for example, use a loop in JavaScript code to locate the specific items you needed to find.
Beginner DOM Firefox 3.5 NeedsBeginnerUpdate

About JavaScript

JavaScript® (often shortened to JS) is a lightweight, interpreted, object-oriented language with first-class functions, and is best known as the scripting language for Web pages, but it's used in many non-browser environments as well. It is a prototype-based, multi-paradigm scripting language that is dynamic, and supports object-oriented, imperative, and functional programming styles.
Beginner Introduction JavaScript

JavaScript technologies overview

Whereas HTML defines a webpage's structure and content and CSS sets the formatting and appearance, JavaScript adds interactivity to a webpage and creates rich web applications.
Beginner DOM JavaScript

Working with objects

JavaScript is designed on a simple object-based paradigm. An object is a collection of properties, and a property is an association between a name (or key) and a value. A property's value can be a function, in which case the property is known as a method. In addition to objects that are predefined in the browser, you can define your own objects. This chapter describes how to use objects, properties, functions, and methods, and how to create your own objects.
beginner Beginner Comparing object Constructor Document Guide JavaScript Object

Class selectors

In an HTML document, CSS class selectors match an element based on the contents of the element's class attribute. The class attribute is defined as a space-separated list of items, and one of those items must match exactly the class name given in the selector.
Beginner CSS CSS Reference Selectors