Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
(Another) question about html and css
#17
Locked Wrote:I don't believe there are if statements in CSS and HTML. JavaScript and PHP obviously have them though.

Conditional comments exist, but yeah HTML and CSS are not code, so there is no branching logic.

Of course, you still have conditions. A CSS document tells your browser "if the content is a paragraph, display it this way. if it is a level 3 header, display it that way." And your body definition is an else catch-all that tells the browser how to display things that don't have a specific definition.
Reply


Messages In This Thread
(Another) question about html and css - by Dusk - 2013-04-01, 04:54 PM
(Another) question about html and css - by Locked - 2013-04-02, 04:15 PM
(Another) question about html and css - by Dusk - 2013-04-02, 05:26 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)