Magento 2 comes with new features and functionality. Every business has different needs and different strategies to achieve goals. Magento 2 development has many standards to follow.

We will discuss today regarding how to add custom css file in head section. We use layout xml files to add css below is an example.

<head>
<css src=”Namespace_YourModule::css/styles.css”/>
</head>

Now, add css file to path, clear cache and deploy static content below commands can help you.

php bin/magento cache:clean
php bin/magento setup:static-content:deploy

Thank You.!