both HTML and CSS files are text
HTML and CSS both have their own different/specific syntax, but you can create them in a plain text file (on PCs people use Notepad).
There are helpful applications, such as Dreamweaver, that can be used to create your HTML and CSS text files.
I didn't quite follow your query. It's always best if you post the code
-- inside which will set the code apart and make it easier to follow. Most helpful would be to provide a link to an online page.
P.S.-- HTML <tags> form the structure of page content. CSS style rules can be applied to these HTML <tags> to affect the appearance of the page content. Sounds like you need to do some homework to better understand how CSS works with HTML markup.
See for instance http://www.html.net/tutorials/css/lesson2.php,