Style Code in <head> Section
To include style code in the <head> section of an HTML document, you can use the <style> tag and define all CSS codes within the <style> open and close tags, for example:
Syntax Example to Write CSS Code in <head> Section
<!DOCTYPE html>
<html>
<head>
<title>First Web Page</title>
<style>
body { font-family: Arial, sans-serif; background-color: #f0f0f0; color: #333; }
h1 { color: #0066cc; }
</style>
</head>
<body>
<h1>Hello, World!</h1>
</body>
</html>