diff --git a/src/index.php b/src/index.php
index 371a97900b..9e75b990c5 100644
--- a/src/index.php
+++ b/src/index.php
@@ -30,7 +30,10 @@ wp_check_php_mysql_versions();
 wp_load_translations_early();
 
 // Die with an error message
-$die = __( 'You are running WordPress without JavaScript and CSS files. These need to be built.' ) . '</p>';
+$die = sprintf(
+	'<p>%s</p>',
+	__( 'You are running WordPress without JavaScript and CSS files. These need to be built.' )
+);
 
 $die .= '<p>' . sprintf(
 	/* translators: %s: npm install */
diff --git a/src/wp-admin/css/common.css b/src/wp-admin/css/common.css
index 3a84f856b8..406e522411 100644
--- a/src/wp-admin/css/common.css
+++ b/src/wp-admin/css/common.css
@@ -460,6 +460,12 @@ code {
 	white-space: nowrap;
 }
 
+.wp-die-message {
+	font-size: 13px;
+	line-height: 1.5;
+	margin: 1em 0;
+}
+
 /* .widefat - main style for tables */
 .widefat {
 	border-spacing: 0;
diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php
index 29beb4370c..8a7897a909 100644
--- a/src/wp-includes/functions.php
+++ b/src/wp-includes/functions.php
@@ -3191,9 +3191,12 @@ function _default_wp_die_handler( $message, $title = '', $args = array() ) {
 				wp_list_pluck( $parsed_args['additional_errors'], 'message' )
 			);
 			$message = "<ul>\n\t\t<li>" . join( "</li>\n\t\t<li>", $message ) . "</li>\n\t</ul>";
-		} else {
-			$message = "<p>$message</p>";
 		}
+
+		$message = sprintf(
+			'<div class="wp-die-message">%s</div>',
+			$message
+		);
 	}
 
 	$have_gettext = function_exists( '__' );
@@ -3263,7 +3266,8 @@ function _default_wp_die_handler( $message, $title = '', $args = array() ) {
 		#error-page {
 			margin-top: 50px;
 		}
-		#error-page p {
+		#error-page p,
+		#error-page .wp-die-message {
 			font-size: 14px;
 			line-height: 1.5;
 			margin: 25px 0 20px;