I am new to CSS and I am following the example book:
Iv'e copied the following from the book and saved it as HTML. all css properties seem to work, except for the "content" property, which is not displayed. Thanks in advance.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title> The content property </title> <style type='text/css' media='all'> div { content: "Hello, world!"; } </style> </head> <body> <div></div> </body> </html>
css
Greycrow
source share