Pen Settings

HTML

CSS

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

JavaScript

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

Behavior

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.

HTML

              
                <section>
	<h1>Keyboard navigation with <code>tabindex</code> and <code>aria-hidden</code></h1>

	<article class="post">
		<a href="/path/to/full/post" class="post__thumb" aria-hidden="true" tabindex="-1"><img src="https://blush.ly/D_pgryrJp/p?bg=FFF8F8"  />
		</a>
		<div class="post__content">
			<a href="/path/to/full/post" class="post__title">
				<h2>The Habits of Highly Successful Creatives</h2>
			</a>
			<div class="post__meta">
				<p>Written by <a href="#">Jane Doe</a> on June 15th 2020</p></div>
			<div class="post__desc">
				Lorem ipsum, dolor sit amet consectetur adipisicing elit. Harum dolor nostrum fuga non libero voluptas aperiam facilis laboriosam deserunt tenetur neque, officiis quas explicabo! Excepturi eius rerum cum perspiciatis est!
			</div>
			<a href="/path/to/full/post" aria-hidden="true" tabindex="-1" class="post__read-more">Read More</a>
		</div>
	</article>

	<article class="post">
		<a href="/path/to/full/post" class="post__thumb" aria-hidden="true" tabindex="-1"><img src="https://blush.ly/zEMDj4F5M/p?bg=f4f3ee"  />
		</a>
		<div class="post__content">
			<a href="/path/to/full/post" class="post__title">
				<h2>How to Stay Sane While Working From Home</h2>
			</a>
			<div class="post__meta">
				<p>Written by <a href="#">Jane Doe</a> on June 15th 2020</p></div>
			<div class="post__desc">
				Lorem ipsum, dolor sit amet consectetur adipisicing elit. Harum dolor nostrum fuga non libero voluptas aperiam facilis laboriosam deserunt tenetur neque, officiis quas explicabo! Excepturi eius rerum cum perspiciatis est!
			</div>
			<a href="/path/to/full/post" aria-hidden="true" tabindex="-1" class="post__read-more">Read More</a>
		</div>
	</article>

	<article class="post">
		<a href="/path/to/full/post" class="post__thumb" aria-hidden="true" tabindex="-1"><img src="https://blush.ly/jX79SIa-g/p?bg=fdf5f5"  />
		</a>
		<div class="post__content">
			<a href="/path/to/full/post" class="post__title">
				<h2>Home Office Ergonnomics</h2>
			</a>
			<div class="post__meta">
				<p>Written by <a href="#">Jane Doe</a> on June 15th 2020</p></div>
			<div class="post__desc">
				Lorem ipsum, dolor sit amet consectetur adipisicing elit. Harum dolor nostrum fuga non libero voluptas aperiam facilis laboriosam deserunt tenetur neque, officiis quas explicabo! Excepturi eius rerum cum perspiciatis est!
			</div>
			<a href="/path/to/full/post" aria-hidden="true" tabindex="-1" class="post__read-more">Read More</a>
		</div>
	</article>

	<article class="post">
		<a href="/path/to/full/post" class="post__thumb" aria-hidden="true" tabindex="-1"><img src="https://blush.ly/_4clTKQwR/p?bg=f7f6f6"  />
		</a>
		<div class="post__content">
			<a href="/path/to/full/post" class="post__title">
				<h2>Staying Connected to Friends</h2>
			</a>
			<div class="post__meta">
				<p>Written by <a href="#">Jane Doe</a> on June 15th 2020</p></div>
			<div class="post__desc">
				Lorem ipsum, dolor sit amet consectetur adipisicing elit. Harum dolor nostrum fuga non libero voluptas aperiam facilis laboriosam deserunt tenetur neque, officiis quas explicabo! Excepturi eius rerum cum perspiciatis est!
			</div>
			<a href="/path/to/full/post" aria-hidden="true" tabindex="-1" class="post__read-more">Read More</a>
		</div>
	</article>
	
	<article class="post">
		<a href="/path/to/full/post" class="post__thumb" aria-hidden="true" tabindex="-1"><img src="https://blush.ly/D_pgryrJp/p?bg=FFF8F8"  />
		</a>
		<div class="post__content">
			<a href="/path/to/full/post" class="post__title">
				<h2>The Habits of Highly Successful Creatives</h2>
			</a>
			<div class="post__meta">
				<p>Written by <a href="#">Jane Doe</a> on June 15th 2020</p></div>
			<div class="post__desc">
				Lorem ipsum, dolor sit amet consectetur adipisicing elit. Harum dolor nostrum fuga non libero voluptas aperiam facilis laboriosam deserunt tenetur neque, officiis quas explicabo! Excepturi eius rerum cum perspiciatis est!
			</div>
			<a href="/path/to/full/post" aria-hidden="true" tabindex="-1" class="post__read-more">Read More</a>
		</div>
	</article>

	<article class="post">
		<a href="/path/to/full/post" class="post__thumb" aria-hidden="true" tabindex="-1"><img src="https://blush.ly/zEMDj4F5M/p?bg=f4f3ee"  />
		</a>
		<div class="post__content">
			<a href="/path/to/full/post" class="post__title">
				<h2>How to Stay Sane While Working From Home</h2>
			</a>
			<div class="post__meta">
				<p>Written by <a href="#">Jane Doe</a> on June 15th 2020</p></div>
			<div class="post__desc">
				Lorem ipsum, dolor sit amet consectetur adipisicing elit. Harum dolor nostrum fuga non libero voluptas aperiam facilis laboriosam deserunt tenetur neque, officiis quas explicabo! Excepturi eius rerum cum perspiciatis est!
			</div>
			<a href="/path/to/full/post" aria-hidden="true" tabindex="-1" class="post__read-more">Read More</a>
		</div>
	</article>

	<article class="post">
		<a href="/path/to/full/post" class="post__thumb" aria-hidden="true" tabindex="-1"><img src="https://blush.ly/jX79SIa-g/p?bg=fdf5f5"  />
		</a>
		<div class="post__content">
			<a href="/path/to/full/post" class="post__title">
				<h2>Home Office Ergonnomics</h2>
			</a>
			<div class="post__meta">
				<p>Written by <a href="#">Jane Doe</a> on June 15th 2020</p></div>
			<div class="post__desc">
				Lorem ipsum, dolor sit amet consectetur adipisicing elit. Harum dolor nostrum fuga non libero voluptas aperiam facilis laboriosam deserunt tenetur neque, officiis quas explicabo! Excepturi eius rerum cum perspiciatis est!
			</div>
			<a href="/path/to/full/post" aria-hidden="true" tabindex="-1" class="post__read-more">Read More</a>
		</div>
	</article>

	<article class="post">
		<a href="/path/to/full/post" class="post__thumb" aria-hidden="true" tabindex="-1"><img src="https://blush.ly/_4clTKQwR/p?bg=f7f6f6"  />
		</a>
		<div class="post__content">
			<a href="/path/to/full/post" class="post__title">
				<h2>Staying Connected to Friends</h2>
			</a>
			<div class="post__meta">
				<p>Written by <a href="#">Jane Doe</a> on June 15th 2020</p></div>
			<div class="post__desc">
				Lorem ipsum, dolor sit amet consectetur adipisicing elit. Harum dolor nostrum fuga non libero voluptas aperiam facilis laboriosam deserunt tenetur neque, officiis quas explicabo! Excepturi eius rerum cum perspiciatis est!
			</div>
			<a href="/path/to/full/post" aria-hidden="true" tabindex="-1" class="post__read-more">Read More</a>
		</div>
	</article>

</section>

<footer>
	Illustrations by <a href="https://blush.design/artists/vijay-verma">Vijay Verma</a>
</footer>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css2?family=Montaga&family=Source+Sans+Pro:wght@300&display=swap');

*:focus {
	outline: 3px solid hsla(199, 28%, 24%, .7);
	outline-offset: 2px;
}

body {
	padding: 0;
	margin: 0;
	background-color: hsl(150, 25%, 90%);
	font-family: 'Source Sans Pro', sans-serif;
	line-height: 1.5;
}

section {
	padding: 5vw;
	@media all and (min-width: 1200px){
		display: grid;
		grid-gap: 2rem;
		grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
	}
	
	h1{	
		grid-column: 1 / -1;
	}
	

		
}

hr {
	display: block;
	height: 2px;
	background-color: hsl(199, 28%, 24%);
	border: none;
	margin: 5rem;
}

p {
	margin-top: 0;
	margin-bottom: 1.5em;
}

.post {
	background-color: #fff;
	box-shadow: 0px 4px 8px rgba(37, 37, 37, 0.1);
	margin-bottom: 2rem;
	
	
	a {
		font-weight: bold;
		color: inherit;
		text-decoration-color: hsl(47, 100%, 50%);
		transition: text-decoration-color .2s linear;
		
		&:hover {
			text-decoration-color: hsl(199, 28%, 24%);
		}
		
	}
	img {
		width: 100%;
	}
	
	@media all and (min-width: 640px) {
		display: grid;
		grid-template-columns: minmax(250px, 1fr) 1fr;
		grid-gap: 2rem;
		
		img {
			height: 100%;
			object-fit: cover;
		}
	}
	
}


.post__content {
	padding: 2rem;
	
	@media all and (min-width: 640px) {
		padding: 4rem 2rem 4rem 0;
	}
}

.post__title {
	display: block;
	
	h2 {
		font-size: 1.6rem;
		line-height: 1.3;
		margin-top: 0;
		margin-bottom: .5rem;
		font-family: 'Montaga', serif;
	}

}

.post__meta {
	font-size: .85em;
}

.post__desc {
	margin-bottom: 2rem;
}
.post__read-more {
	display: block;
	font-weight: bold;
}
              
            
!

JS

              
                
              
            
!
999px

Console