A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.w3resource.com/html-css-exercise/type-selector-answer.php below:

Website Navigation


HTML CSS Exercise: Type selector

HTML CSS Exercise: Type selectorLast update on March 04 2024 06:50:40 (UTC/GMT +8 hours) Solution:

HTML Code :

<!DOCTYPE HTML><!-- Document type declaration -->
<html lang="en"><!-- Opening HTML tag with language attribute set to English -->
<head><!-- Head section containing metadata -->
<meta charset=utf-8><!-- Character encoding declaration -->
<title>CSS Type selector example</title><!-- Title of the HTML document -->
<style type="text/css"> /* Opening style tag for CSS with type attribute */
h1{ /* Type selector targeting all h1 elements */
color:#4b6c9c; /* Set color of h1 elements */
}
</style><!-- Closing style tag -->
</head><!-- Closing head tag -->
<body><!-- Body section of the HTML document -->
<h1>This is heading one</h1><!-- h1 element with text content -->
</body><!-- Closing body tag -->
</html><!-- Closing HTML tag -->

Explanation:

Live Demo :

See the Pen type-selector-answer by w3resource (@w3resource) on CodePen.

Supported browser

What is the difficulty level of this exercise?

Test your Programming skills with w3resource's quiz.




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4