Forum Moderators: open

Message Too Old, No Replies

How to remove italics from <address> tag, for only certain words

<address> tag italics

         

strictwannabe

8:45 am on Jun 26, 2018 (gmt 0)

5+ Year Member



I want to achieve: By Author Name

Using <address> tag, italicises all "By Author Name", so how do I remove italics for "By"... with only HTML tags, and not involving CSS?

Thank you

phranque

8:59 am on Jun 26, 2018 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



<address><span class="foo">By</span> Author Name</address>
and then style foo without italics

keyplyr

9:07 am on Jun 26, 2018 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Using <address> tag, italicises all "By Author Name", so how do I remove italics for "By"... with only HTML tags, and not involving CSS?
Without using CSS, move the <address> tag over so it doesn't include "By"

Example:
By <address>Author Name</address>

Unless you don't control of how that tag is generated, then you need to use CSS and style address without italics.

strictwannabe

9:17 am on Jun 26, 2018 (gmt 0)

5+ Year Member



Thanks for the reply, This causes "By" to be on a separate line from the "Author Name"... I would prefer it all on one line...

keyplyr

9:23 am on Jun 26, 2018 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Try this...
<span>By <address>Author Name</address></span>

Or
By&nbsp;<address>Author Name</address>

lucy24

6:19 pm on Jun 26, 2018 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I think the point is that <address> is a block-level element. The only way to change that would be to say
address {display: inline;}
which leads us squarely into the question exercising everyone's mind: why not CSS?

keyplyr

7:25 pm on Jun 26, 2018 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Or not use the <address> at all. If you still wanted italics for the author's name you could alternatively do:
By <i>Author Name</i>