Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource


Babel is required to process package imports. If you need a different preprocessor remove all packages first.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <!-- cet id "hello" est géré avec javascript ET CSS -->
<p id="hello">HELLO ALL!</p>

<!-- cet id "rdm" est géré avec javascript ET CSS -->
<p id="rdm">RANDOM!</p>

<!-- cet id "unmot" est géré avec javascript ET CSS -->
<p id="unmot">un mot</p>


                p {
	width: 600px;
	color: crimson;
	padding: 20px;
	font-family: helvetica;
	font-size: 24px;

#hello {
	font-family: helvetica;
	font-weight: 900;
	color: white;
	padding: 50px;
	text-align: center;

#rdm {
	font-family: 'Baloo', cursive;
	color: blueviolet;

#unmot {
	color: black;


                var c;
var a;

var toto;
var dog;

var rdm;

//la variable unmot
var unmot;

function setup() {
	var myDiv;
	myDiv = createDiv('Cette balise div est créée en javascript avec la fonction createDiv');

	createP("Voici un nombre choisi au hasard entre 0 et 10 : " + random(10)); //le style de ce texte se trouve dans le CSS avec p
	c = select('#hello'); //ici on selectionne le paragraphe avec l'id #hello
	a = select('#hello');
	toto = random(10,68);
	dog = color(random(255));
	rdm = select('#rdm');
	unmot = select('#unmot');//la variable unmot est assignée avec l'id #unmot'font-size', '90px');//la font size est déterminée en javascript avec la fonction style

function draw() {'font-size', toto + 'px'); //la taille de la font de l'id #hello est en random entre 10 et 68px'background-color', dog); //la couleur de fond du paragraphe avec l'id #hello est en random entre 0 et 255 nuances de gris'font-size', mouseX + 'px');