I'm trying to make some bold and italic text.
When I use <strong> <em> it effects all the text even though I'm using <strong/>
at the end of the text it still effect text further down the page?
How do I then isolate?
Thanks
| SitePoint Sponsor |
I'm trying to make some bold and italic text.
When I use <strong> <em> it effects all the text even though I'm using <strong/>
at the end of the text it still effect text further down the page?
How do I then isolate?
Thanks

You'll kick yourself...
The closing tag is </strong>, with the slash before the element name. That's the case for any non-empty element. It's only elements that can't contain any content that you put the slash at the end to make it self-closing (for example, <hr/> is equivalent to <hr></hr>).
Any posts I write in Arial are on my mobile phone, so please excuse typos etc.
Any posts I write in Verdana are on a PC, so feel free to berate me mercilessly for any mistakes

Stephen J Chapman
javascriptexample.net, Book Reviews, follow me on Twitter
HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
<input name="html5" type="text" required pattern="^$">
Bookmarks