Index: wp-includes/class.wp-scripts.php
===================================================================
--- wp-includes/class.wp-scripts.php	(revision 42202)
+++ wp-includes/class.wp-scripts.php	(working copy)
@@ -123,6 +123,15 @@
 	public $default_dirs;
 
 	/**
+	 * Holds a string which contains the type attribute for script If
+	 * HTML5 support is available then it is initializes as empty string.
+	 *
+	 * @since 4.9.2
+	 * @var string
+	 */
+	private $type_attr = " type='text/javascript'";
+
+	/**
 	 * Constructor.
 	 *
 	 * @since 2.6.0
@@ -130,6 +139,10 @@
 	public function __construct() {
 		$this->init();
 		add_action( 'init', array( $this, 'init' ), 0 );
+
+		if ( current_theme_supports( 'html5', 'script' ) ) {
+			$type_attr = '';
+		}
 	}
 
 	/**
@@ -204,7 +217,7 @@
 			return $output;
 		}
 
-		echo "<script type='text/javascript'>\n"; // CDATA and type='text/javascript' is not needed for HTML 5
+		echo "<script{$type_attr}>\n"; // CDATA and type='text/javascript' is not needed for HTML 5
 		echo "/* <![CDATA[ */\n";
 		echo "$output\n";
 		echo "/* ]]> */\n";
@@ -264,11 +277,11 @@
 		$after_handle  = $this->print_inline_script( $handle, 'after', false );
 
 		if ( $before_handle ) {
-			$before_handle = sprintf( "<script type='text/javascript'>\n%s\n</script>\n", $before_handle );
+			$before_handle = sprintf( "<script%s>\n%s\n</script>\n", $type_attr, $before_handle );
 		}
 
 		if ( $after_handle ) {
-			$after_handle = sprintf( "<script type='text/javascript'>\n%s\n</script>\n", $after_handle );
+			$after_handle = sprintf( "<script%s>\n%s\n</script>\n", $type_attr, $after_handle );
 		}
 
 		if ( $this->do_concat ) {
@@ -331,7 +344,7 @@
 			return true;
 		}
 
-		$tag = "{$cond_before}{$before_handle}<script type='text/javascript' src='$src'></script>\n{$after_handle}{$cond_after}";
+		$tag = "{$cond_before}{$before_handle}<script{$type_attr} src='$src'></script>\n{$after_handle}{$cond_after}";
 
 		/**
 		 * Filters the HTML script tag of an enqueued script.
@@ -401,7 +414,7 @@
 		$output = trim( implode( "\n", $output ), "\n" );
 
 		if ( $echo ) {
-			printf( "<script type='text/javascript'>\n%s\n</script>\n", $output );
+			printf( "<script%s>\n%s\n</script>\n", $type_attr, $output );
 		}
 
 		return $output;
Index: wp-includes/class.wp-styles.php
===================================================================
--- wp-includes/class.wp-styles.php	(revision 42202)
+++ wp-includes/class.wp-styles.php	(working copy)
@@ -101,6 +101,15 @@
 	public $default_dirs;
 
 	/**
+	 * Holds a string which contains the type attribute for style If
+	 * HTML5 support is available then it is initializes as empty string.
+	 *
+	 * @since 4.9.2
+	 * @var string
+	 */
+	private $type_attr = " type='text/css'";
+
+	/**
 	 * Constructor.
 	 *
 	 * @since 2.6.0
@@ -114,6 +123,10 @@
 		 * @param WP_Styles $this WP_Styles instance (passed by reference).
 		 */
 		do_action_ref_array( 'wp_default_styles', array( &$this ) );
+
+		if ( current_theme_supports( 'html5', 'style' ) ) {
+			$type_attr = '';
+		}
 	}
 
 	/**
@@ -162,7 +175,7 @@
 		// A single item may alias a set of items, by having dependencies, but no source.
 		if ( ! $obj->src ) {
 			if ( $inline_style = $this->print_inline_style( $handle, false ) ) {
-				$inline_style = sprintf( "<style id='%s-inline-css' type='text/css'>\n%s\n</style>\n", esc_attr( $handle ), $inline_style );
+				$inline_style = sprintf( "<style id='%s-inline-css'%s>\n%s\n</style>\n", esc_attr( $handle ), $type_attr, $inline_style );
 				if ( $this->do_concat ) {
 					$this->print_html .= $inline_style;
 				} else {
@@ -221,7 +234,7 @@
 			$this->print_html .= $conditional_pre;
 			$this->print_html .= $tag;
 			if ( $inline_style = $this->print_inline_style( $handle, false ) ) {
-				$this->print_html .= sprintf( "<style id='%s-inline-css' type='text/css'>\n%s\n</style>\n", esc_attr( $handle ), $inline_style );
+				$this->print_html .= sprintf( "<style id='%s-inline-css'%s>\n%s\n</style>\n", esc_attr( $handle ), $type_attr, $inline_style );
 			}
 			$this->print_html .= $conditional_post;
 		} else {
@@ -281,7 +294,7 @@
 			return $output;
 		}
 
-		printf( "<style id='%s-inline-css' type='text/css'>\n%s\n</style>\n", esc_attr( $handle ), $output );
+		printf( "<style id='%s-inline-css'%s>\n%s\n</style>\n", esc_attr( $handle ), $type_attr, $output );
 
 		return true;
 	}
Index: wp-includes/embed.php
===================================================================
--- wp-includes/embed.php	(revision 42202)
+++ wp-includes/embed.php	(working copy)
@@ -877,8 +877,12 @@
  * @since 4.4.0
  */
 function print_embed_styles() {
+	$type_attr = " type='text/css'";
+	if ( current_theme_supports( 'html5', 'style' ) ) {
+		$type_attr = '';
+	}
 	?>
-	<style type="text/css">
+	<style<?php echo $type_attr; ?>>
 	<?php
 	if ( SCRIPT_DEBUG ) {
 		readfile( ABSPATH . WPINC . '/css/wp-embed-template.css' );
Index: wp-includes/formatting.php
===================================================================
--- wp-includes/formatting.php	(revision 42202)
+++ wp-includes/formatting.php	(working copy)
@@ -5271,8 +5271,13 @@
 	}
 
 	$printed = true;
+
+	$type_attr = " type='text/css'";
+	if ( current_theme_supports( 'html5', 'style' ) ) {
+		$type_attr = '';
+	}
 ?>
-<style type="text/css">
+<style<?php echo $type_attr; ?>>
 img.wp-smiley,
 img.emoji {
 	display: inline !important;
Index: wp-includes/widgets/class-wp-widget-recent-comments.php
===================================================================
--- wp-includes/widgets/class-wp-widget-recent-comments.php	(revision 42202)
+++ wp-includes/widgets/class-wp-widget-recent-comments.php	(working copy)
@@ -53,9 +53,11 @@
 			|| ! apply_filters( 'show_recent_comments_widget_style', true, $this->id_base ) ) {
 			return;
 		}
-		?>
-		<style type="text/css">.recentcomments a{display:inline !important;padding:0 !important;margin:0 !important;}</style>
-		<?php
+		if ( current_theme_supports( 'html5', 'style' ) ) {
+			echo "<style>.recentcomments a{display:inline !important;padding:0 !important;margin:0 !important;}</style>";
+		} else {
+			echo "<style type='text/css'>.recentcomments a{display:inline !important;padding:0 !important;margin:0 !important;}</style>";
+		}
 	}
 
 	/**
