Based on computer simulations of the thermal behavior of chondrules and aggregates of dust as well as on existing observational and experimental evidence, we propose a model for the formation of chondrules by electromagnetic (EM) radiation. Heating occurred primarily by the absorption of ∼0.3- to 8-μm EM radiation, with peak fluxes near ∼5 × 10 6 W m -2 and heating durations between 10 3 and 10 5 sec. Chondrules were produced from aggregates of dust having size distributions similar to those predicted by models of dust agglomeration, i.e., an increasing abundance of aggregates with decreasing aggregate size. Size-dependent heating resulted in an underabundance of small (<50 μm in diameter) chondrules. The paucity of large chondrules (>3 mm in diameter) reflects the low abundance of large precursor dust aggregates. Dust aggregates rich in metals and sulfides absorbed light more efficiently than those composed purely of silicates, resulting in smaller mean sizes for chondrules having higher densities. Higher radiative fluxes resulted in higher peak chondrule temperatures, smaller mean chondrules sizes, and a greater proportion of chondrules having nonporphyritic textures. Small unmelted grains and grain aggregates coexisted with molten chondrules; temperature differences between coexisting μm-size grains and mm-size chondrules may have exceeded several hundred K. The continual supply of seed crystals by the incorporation of solid grains into molten chondrules inhibited the formation of chondrules having textures characteristic of complete melting. As chondrules cooled and solidified, chondrule seeding graded into formation of "dusty" rims, with the efficiency of rim formation inversely proportional to the smallest size of chondrules produced. Small unmelted grains and aggregates in chondrule-forming regions ultimately contributed to the dusty matrix of chondrites.