One solution could be to use Gulp + Critical extension.
It's a free cross platform CLI tool. And it allows to extract critical CSS and either embed it into HTML file or extract it to another CSS file.
When you get to configuring your gulpfile.js, here's mine which I've used while testing this:
const gulp = require('gulp');
const critical = ...
I've found that the solution is to use Gulp with additional packages (namely Panini to compile html).
Here are some of the packages I've used:
gulp — runs other packages (see below), moves files from source to distribution directory.
panini — handles compiling HTML files from templates, plus other useful stuff like adding 'active' classes to menu items and ...
I've been a coder for over a decade. For websites HTML5 is the most used language. It's really easy to learn and one of the best languages. CSS is one of many styling languages, CSS is also easy to learn. It's the styling language I recommend the most for beginners.