Good time of day. Sorry, there was a problem importing the CSS file into HTML. Can you tell me what my mistake is? Thank you very much in advance.

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <link rel="stylesheet" href="style0.css"> </head> <body> <h1 align="center">История</h1> <h2 align="center">XVI век</h2> </body> </html> 

This HTML file is in the raw folder, as is the css file. HTML connection:

 WebView webView = findViewById(R.id.webView); Intent intent = getIntent(); String resName = "guide" + intent.getIntExtra("title", 0); //получаем строку и формируем имя ресурса Log.i("name", resName); Context context = getBaseContext(); //получаем контекст String text = readRawTextFile(context, getResources().getIdentifier(resName, "raw", "ru.author.project")); //читаем текстовый файл из ресурсов по имени webView.loadDataWithBaseURL(null, text, "text/html", "UTF-8", null); 

And the CSS file itself (also from the raw folder):

 @charset "utf-8"; .Main { width:100%; height:100%; } h1 { color: #FF0000; } 

Well, the problem itself is that the color of the headings does not change to red.

    0