Difference between span and div

Giganews Newsgroups
Subject: Difference between span and div
Posted by:  Swifty (steve.j.swi…@gmail.com)
Date: Mon, 17 Aug 2015

I have a webpage that contains a section like this:

<DIV STYLE="FONT-SIZE:80%">
<TABLE WIDTH=100%>
<TR><TD><P CLASS=hr>
<TR><TD><H2 STYLE="margin-top:0;margin-bottom:5px">Debug:</H2>
</TABLE>
<TABLE>
<TR VALIGN=TOP><TD ALIGN=RIGHT>17<TD>Subroutines: subroutines.rex
</TABLE>
</DIV>

This works fine, the main point being that the text size is reduced to 80%

However, I  don't get on with DIVs, so I normally use <SPAN> for things
like this.  But when I used <SPAN …> instead of <DIV …> then the text
size did not reduce.

Why might this be?

--
Steve Swift
http://www.swiftys.org.uk/

Replies