Do you want to change the style of a class of text like Header 1, or the default for all text.
To change all body text, I would use
tags$head(tags$style('body {color:red;}')),
To change all paragraphs
tags$head(tags$style('p {color:red;}')),
To change Header 1
tags$head(tags$style('h1 {color:red;}')),
The #text1 in your example affects only the element with the id set to text1