It appears the attributes of the display
style are ignored by the simple CSS engine provided with the JSE. This source demonstrates that. The styled text is red, but the display attribute does not change anything.

import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;
class HTMLDisplayStyle {
final static String EOL = System.getProperty("line.separator");
final static String HTML_PRE = "<html>" + EOL
+ "<head>" + EOL
+ "<style>" + EOL
+ "span {" + EOL
+ "color: #FF0000;" + EOL
+ "display: ";
final static String HTML_POST = ";" + EOL
+ "}" + EOL
+ "</style>" + EOL
+ "</head>" + EOL
+ "<body>" + EOL
+ "<p>" + EOL
+ "Some text " + EOL
+ "<span>text with display style</span> " + EOL
+ "some more text." + EOL
+ "</p>" + EOL
+ "</body>" + EOL
+ "</html>" + EOL;
final static String[] ATTRIBUTES = {
"inline",
"block",
"none"
};
public static void main(String[] args) {
Runnable r = new Runnable() {
@Override
public void run() {
JPanel gui = new JPanel(new BorderLayout());
String s = HTML_PRE + ATTRIBUTES[0] + HTML_POST;
final JTextArea ta = new JTextArea(s, 15, 30);
gui.add(new JScrollPane(ta), BorderLayout.PAGE_END);
final JLabel l = new JLabel(s);
gui.add(new JScrollPane(l));
final JComboBox style = new JComboBox(ATTRIBUTES);
gui.add(style, BorderLayout.PAGE_START);
ActionListener styleListener = new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
String styleAttribute =
style.getSelectedItem().toString();
String html = HTML_PRE + styleAttribute + HTML_POST;
ta.setText(html);
l.setText(html);
}
};
style.addActionListener(styleListener);
JOptionPane.showMessageDialog(null, gui);
}
};
// Swing GUIs should be created and updated on the EDT
// http://docs.oracle.com/javase/tutorial/uiswing/concurrency
SwingUtilities.invokeLater(r);
}
}