Separating behavior

The modern understanding of a web page is that it consists of three distinct parts:

  1. Content (HTML)
  2. Presentation (CSS)
  3. Behavior (JavaScript)

These should be kept separate, ideally each in its own file (or files). What it means for JavaScript is that there should be no inline such as onclick, onmouseover, etc. Ideally there should be little to no inline scripts.

The idea is that content (the text on the page) is independent of:

  • how it looks like, so the page should be usable even with CSS disabled, or not supported by the browser, and
  • how it behaves, meaning the page should be usable even with JavaScript disabled. The content should be accessible independent of any mouseovers, animations, and so on.

32 Responses to “Separating behavior”

  1. tinyurl.com Says:

    “JSPatterns.com » Separating behavior” seriously makes me personally imagine a small bit further.
    I actually appreciated each and every particular section of this post.
    Many thanks ,Chi

  2. coconut oil Says:

    Several European countries have either banned hydrogenated and partially hydrogenated oils or have set future dates for elimination of their use in foods.
    Coconut Oil is solid at temperatures below 76 degrees. It doesn’t cost a lot of money and can be used for a wide variety of health and beauty reasons.

  3. Love find Says:

    Thanks for sharing your thoughts on find your ex girlfriend.
    Regards

  4. balenciaga Says:

    With havin so much content do you ever run into any problems of plagorism or copyright infringement?
    My website has a lot of exclusive content I’ve either written myself or outsourced but it looks like a lot of it is popping it up all over the web without my permission. Do you know any ways to help prevent content from being ripped off? I’d definitely appreciate it.

  5. Ashleigh Says:

    Its such as you learn my mind! You appear to know so much about this, like you wrote the book in it or something.
    I think that you simply can do with a few p.c. to force the
    message home a bit, however other than that, that is magnificent blog.
    A fantastic read. I will certainly be back.

  6. Stephany Says:

    When someone writes an post he/she retains the thought of a user in
    his/her brain that how a user can understand it. Therefore that’s why this article is amazing. Thanks!

  7. Jerald Says:

    You ought to be a part of a contest for one of the greatest
    sites on the web. I am going to highly recommend this
    site!

  8. Joanne Says:

    Thank you for another fantastic article. The place else may anybody get that type of information
    in such an ideal approach of writing? I have a presentation subsequent week,
    and I am on the look for such info.

  9. argan oil Says:

    It works to mitigate the drying and physiological aging
    of the skin (anti-wrinkle properties) by restoring the hydrolipidic film
    and by increasing nutritive contributions at the cellular level.

    I am always advocating to drink more orange juice and eat fewer pastries
    around my home. Even though there exists a saying ‘Do not judge a book by its cover’, we human beings are very
    insecure creatures when it comes to our physical flaws and hence we rely on beauty products to
    cover them or get rid of them.

  10. Windows 8.1 Key Generator Says:

    Howdy! I could have sworn I’ve visited this site before but after looking at many of the articles I realized it’s new to me.
    Anyways, I’m definitely pleased I found it and I’ll be bookmarking it and
    checking back regularly!

  11. Anonymous Says:

    Excellent notable analytical eye regarding detail and can
    anticipate troubles just before these people occur.

  12. Anonymous Says:

    I love to share understanding that I have accumulated with the calendar year to help enhance team
    performance.

  13. handshaker handsome handsomely handspike handspring handstand handwork handwoven handwriting handy handyman hang hang about hang back hang in hang on hang out hang together hang up hang-up hangar hangbird hangdog hanger hanger-on hanging hanging buttress Says:

    I like to share knowledge that I’ve built up through the 12 months to assist improve group functionality.

  14. jocuri care se joaca online Says:

    You really make it appear so easy along with your presentation but I in
    finding this matter to be really something which I believe I might by
    no means understand. It sort of feels too complex and extremely wide for me.
    I’m looking forward on your next post, I will attempt to get the hang of it!

  15. how to get rid of the yellow in grey hair Says:

    Well, joint-top grey hair in eyebrow alongside Inter at
    any rate. Oh boy, I scratched one of those seven million
    women using home hair dye kit, and those with red or
    black hair. Allow the shampoo to permeate the hair shaft.

  16. Dogs.Funny Says:

    hi dog fans,

    you may like my youtube ρupру video
    have fun with it!

    Have a look at my webpage … Dogs.Funny

  17. mobile phone betting Says:

    Hi, just wanted to mention, I liked this post.
    It was funny. Keep on posting!

  18. seguros de coche economicos Says:

    I’m more than happy to find this site. I wanted to thank you for ones time due to this wonderful read!! I definitely savored every bit of it and I have you saved as a favorite to see new information on your site.

  19. The Immortals Imnaha Imo Imogen Imogene Imojean Imola Imolinda Imp Impatiens Impatientaceae Impennes Imperata Imperforata Imperia Imperial Imperial Beach Imperial Highness Imperial Holiday Imperial Majesty Imperial Valley Imperial bushel Impeyan Imphal Im Says:

    I love to share knowledge that will I have accumulated with the yr to assist improve team efficiency.

  20. misery misesteem misestimate misfeasance misfeasor misfile misfire misfit misfortune misgive misgiving misgovern misguidance misguide misguided mishandle mishap mishear mishmash misinform misinterpret misjoinder misjudge mislay mislead misleading mislike Says:

    Good day! I simply would like to give a huge thumbs up for the good info you have got right here on this post.
    I might be coming back to your blog for more soon.

  21. mini SAS Says:

    Excellent notable analytical eye just for details and can foresee issues prior to they occur.

    Also visit my website – mini SAS

  22. baby games dress up free baby games dress up free online baby games dress up girls only baby games dress up online baby games for boys 2012 baby games for boys dress up games baby games for boys online baby games for boys only baby games for boys to play Says:

    Howdy! I simply would like to give a huge thumbs up for the
    good info you have here on this post. I will likely be coming back to your weblog for
    extra soon.

  23. free ipad 3 Says:

    I got this web page from my pal who told me concerning this web site and at the
    moment this time I am visiting this site and reading very
    informative articles here.

  24. wine air pump Says:

    Hello would you mind sharing which blog platform you’re working with? I’m going to start my own blog soon but I’m having a tough time deciding between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your design and style seems different then most blogs and I’m looking for something unique. P.S My apologies for being off-topic but I had to ask!

  25. discount kindle Says:

    Hey! This post couldn’t be written any better! Reading through this post reminds me of my old room mate! He always kept talking about this. I will forward this post to him. Pretty sure he will have a good read. Many thanks for sharing!

  26. texas mortgage broker Says:

    I know this if off topic but I’m looking into starting my own weblog and was curious what all is needed to get set up? I’m assuming having a blog like yours would cost a pretty penny? I’m not very internet savvy so I’m not 100% certain. Any recommendations or advice would be greatly appreciated. Thanks

  27. Kirby Says:

    You can also host a calendar, recipes, and even voting polls on your
    Family – Lobby. The price is free, and there are
    infinite variations of the software, due to various plugins,
    as they are called, that are available to use for different functions.

  28. Grass Mats Says:

    In warm, arid countries, grass mats serve as a building material. Make a simple mat for a bed, or connect many large mats to make a hut. If in an emergency situation, weave grass mats to create a small, warm shelter. Use these mats in your garden to mark out paths and mulch the areas between plant rows.

  29. 行銷 Says:

    I love to share knowledge that I have accumulated with the 12 months to assist improve team functionality.

    my website … 行銷

  30. ablocal.com Says:

    Well, at least funeral homes in dallas yoou won’t need makeup remover.
    Now, one of the main funeral home entrance. He hhas been able
    to reduce exam time by more than 300 visitors.

  31. vuitton 財布 値段 Says:

    http://artandcraftmasters.com/nfl/?nid=roller-hockey-jerseys-4045M.html

  32. Accident lawyer Says:

    Useful information. Fortunate me I discovered your website unintentionally, and I am surprised why this coincidence didn’t happened earlier! I bookmarked it.