Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

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.

HTML

              
                <table class="outlinks" id="outlinks">
	<!-- below is the header of the table -->
	<thead>
		<tr>
			<th>Button</th>
			<th>Title</th>
			<th>Description</th>
		</tr>
	</thead>
	<!-- the body of the table below contains all the buttons, titles, etc themselves. please leave the inline styles for images in there - they're crucial -->
	<tbody id="wall">
		<!-- below begins a single row featuring one site -->
		<tr>
			<td>
				<!-- image and link to site go here. right now, there's this example as a stand-in; please remove it -->
				<a href="https://fabled.day" target="_blank"><img src="https://www.fabled.day/image/banner88.gif"></a>
			</td>
			<td>Site title goes here...</td>
			<td>Site Description goes here.</td>
		</tr>
		<!-- here ends a single row featuring one site -->

		<tr>
			<td>
				<!-- image and link to site go here. right now, there's this example as a stand-in; please remove it -->
				<a href="https://fabled.day" target="_blank"><img src="https://www.fabled.day/image/banner88.gif"></a>
			</td>
			<td>Site title goes here.</td>
			<td>Site Description goes here...</td>
		</tr>
		<tr>
			<td>
				<!-- image and link to site go here. right now, there's this example as a stand-in; please remove it -->
				<a href="https://fabled.day" target="_blank"><img src="https://www.fabled.day/image/banner88.gif"></a>
			</td>
			<td>Site title goes here.</td>
			<td>Site Description? Goes here.</td>
		</tr>
		<tr>
			<td>
				<!-- image and link to site go here. right now, there's this example as a stand-in; please remove it -->
				<a href="https://fabled.day" target="_blank"><img src="https://www.fabled.day/image/banner88.gif"></a>
			</td>
			<td>Site title goes here.</td>
			<td>Site Description goes here.</td>
		</tr>
		<tr>
			<td>
				<!-- image and link to site go here. right now, there's this example as a stand-in; please remove it -->
				<a href="https://fabled.day" target="_blank"><img src="https://www.fabled.day/image/banner88.gif"></a>
			</td>
			<td>Site title goes here.</td>
			<td>Site Description goes <a href="#">here</a>.</td>
		</tr>

		<!-- goodnight, table -->
	</tbody>
</table>
              
            
!

CSS

              
                body {
	font-family: sans-serif;
	background-color: #fdc0c0;
}
/* styling the table itself */
table.outlinks {
	margin: 2em auto;
	width: 60%; /* please change width of table as you fancy, as well as top-bottom margin, but if you leave the left-right margins set toauto, it will remain centered */
	background-color: #fdc0c0; /* color of the table cell's background (except the header) */
	border-collapse: separate;
	border-spacing: 0;
	border: 5px solid #f8a4a1; /* color of the border surrounding the entire thing*/
	color: #50330b;
	border-radius: 5px;
	overflow: hidden;
}

table.outlinks td,
table.outlinks th {
	border: 5px solid #f8a4a1; /* inner border, looks best if same color as outer */
	padding: 0.2em;
	vertical-align: middle;
}
/* below styles the header of the table */
table.outlinks th {
	font-size: 1.3em;
	color: #ba615f;
}

table.outlinks thead {
	background-color: #f8a4a1;
}

/* making sure the buttons have the correct amount of space within the first row of cells; change if using a different button size */
table td:first-child {
	width: 88px;
	height: 31px;
}

/* links within the table, styled as simply as possible changing background color and text color */
table.outlinks a {
	color: #ba615f;
	text-decoration: none;
	position: relative;
	border-radius: 0.1em;
	transition: ease 1s all;
}

table.outlinks a:hover {
	background-color: #ba615f;
	color: #fdc0c0;
}

/* making sure the hover link animation does not effect the background of the buttons, which might be transparent */
table td:first-child a:hover {
	background-color: #fdc0c0;
}

              
            
!

JS

              
                //https://www.freecodecamp.org/news/how-to-shuffle-an-array-of-items-using-javascript-or-typescript/
function buttonshuffle() {
	const wall = document.querySelector("#wall");

	const buttons = Array.from(wall.querySelectorAll("tr"));

	for (let i = buttons.length - 1; i > 0; i--) {
		const buttonized = Math.floor(Math.random() * (i + 1));
		[buttons[i], buttons[buttonized]] = [buttons[buttonized], buttons[i]];
	}

	buttons.forEach((tr) => wall.appendChild(tr));
}

buttonshuffle();

              
            
!
999px

Console