Get a free trial // Grow your CSS skills // Land your dream job

Styling i and em tags?

  • # February 15, 2013 at 4:10 pm


    Is it considered bad practice to style the i and em tags in css?

    Here is an example:

    i {
    font-family: 'Times New Roman', serif;
    font-style: italic;

    em {
    font-family: 'Times New Roman', serif;
    font-style: italic;
    color: red;

    # February 15, 2013 at 4:12 pm

    Nope, no bad practice

    # February 15, 2013 at 4:13 pm

    I wouldn’t necessarily call it ‘bad practice’. I’d say you might want to be more specific than just outright `em { }`. Maybe you want to do something like `.rte em { }` (rte == rich text editor).

    # February 15, 2013 at 4:14 pm

    Great. Thanks for the help.

    on the same topic… which of the two tags is better suited for simply make text italic. I would assume the i tag…right?

    # February 15, 2013 at 4:20 pm

    Good reading:

    # February 15, 2013 at 4:21 pm


    Awesome…will certainly have a read. Thanks

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed