Changes

Jump to navigation Jump to search
HTML vs. CSS
Line 27: Line 27:  
{{unsigned|Philip J. Rayment}}
 
{{unsigned|Philip J. Rayment}}
    +
I took HTML and I was never told it is better HTML formating to use the span style instead of the font --<span style="margin-top: -3px;">&nbsp;[[Image:50 star flag.png|12px]]</span><span style="position:relative; overflow:hidden; width:88px; height:15px; z-index:2;"> [[User:Deborah]] [[Special:Contributions/Deborah|<font color="gray">(contributions)</font>]] [[User_talk:Deborah|<font color="darkslategray">(talk)</font>]]</span> 23:37, 5 May 2008 (EDT)
   −
I took HTML and I was never told it is better HTML formating to use the span style instead of the font --<span style="margin-top: -3px;">&nbsp;[[Image:50 star flag.png|12px]]</span><span style="position:relative; overflow:hidden; width:88px; height:15px; z-index:2;"> [[User:Deborah]] [[Special:Contributions/Deborah|<font color="gray">(contributions)</font>]] [[User_talk:Deborah|<font color="darkslategray">(talk)</font>]]</span> 23:37, 5 May 2008 (EDT)
+
: [[HTML]] is supposed to be used for ''semantic'' markup, i.e. to indicate things like headings, paragraphs, lists, and quotes.  [[CSS]] is supposed to be used for ''formatting'' markup, i.e. to indicate that headings are large bold text, quotes are indented, etc.  HTML didn't originally cater for CSS, and so it has code to provide formatting as well (and this is still useful in places that don't accept CSS markup, such as some web-based editing boxes, response forms, etc.), but the "proper" way to do formatting is with CSS, not HTML.  The {{tt|<nowiki>style=</nowiki>}} parameter in HTML tags is a way of putting CSS markup directly in the code (CSS markup is normally in a separate file). It doesn't have to be {{tt|<nowiki><span></nowiki>}}, but that is probably the best one if nothing else is already available (e.g. {{tt|<nowiki><div></nowiki>}}).  Also, in many cases CSS provides more options that HTML, although there are a few things which HTML is still better at.  [[User:Philip J. Rayment|Philip J. Rayment]] 23:56, 5 May 2008 (EDT)
nsTeam2RO, nsTeam2RW, nsTeam2_talkRO, nsTeam2_talkRW
13,254

edits

Navigation menu