background preloader

Code

Facebook Twitter

Java

Code Snippets. Displaying code in web pages - webSemantics. Author: mike foskett incept: 25th June 2006 last modified: 4th February 2010 I started this project (25th June 2k6), to display HTML, CSS or JavaScript code blocks, with a list of requirements: Reduce time spent creating code examples be semantically meaningful (X)HTML a cross-browser, cross-platform solution not break the visual layout keep within a set width maintain white-space for clarity be easy to cut & paste all visual styling via CSS optionally stripe each line of code for readability unobtrusive JavaScript work independently of CSS and / or JavaScript.

I also made a HTML text parser which I personally find exceptionally useful. Example Here's an example from the style sheet: So what was wrong with the old methods? I was tired of seeing web pages break from overflow incorrectly applied. Most methods either break the design, don't readily cut and paste, or use quick-fix textboxes. So what's different?

As a demo, each of the code areas on this page use the method. The coding specifics pre. Structure and Interpretation of Computer Programs. Webmonkey: the Web Developers Resource. Code University - Google Code. Developer Home - Google Code. » 25 Code Snippets for Web Designers (Part4) HTML Code Tutorial - Free Reference Guide for Help with HTML Tags Including Form, Frames, Tables, and more!