Jump to content

HTML editor

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Nigelj (talk | contribs) at 21:03, 12 July 2005 (Extenal links: sp). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

A HTML editor is an software application for creating web pages. Although the HTML markup of a web page can be written with any text editor, specialised HTML editors can offer convenience and added functionality. For example, many HTML editors can work not only with HTML, but also with related technologies such as CSS, XML and JavaScript or ECMAScript. In some cases they can also manage communication with remote web servers via FTP and WebDAV, and version management systems such as CVS or Subversion.

Types

There are two flavors of HTML editors: text and What You See Is What You Get (WYSIWYG).

Text editors

Text editors usually provide syntax highlighting. Toolbars and keyboard shortcuts may quickly insert common HTML elements and structures. Wizards, tooltip prompts and auto-completion may help with common tasks.

Text editors require at least a basic understanding of HTML and CSS[starting with HTML + CSS].

WYSIWYG editors

So-called WYSIWYG editors provide an editing interface which resembles how the page will be displayed in a web browser. Most WYSIWIG editors also have a mode to edit HTML directly like a text HTML editor. Because using a WYSIWYG editor does not require any HTML knowledge they are easier for an average computer user to get started with.

The WYSIWYG view is achieved by embedding a layout engine based upon that used in a web browser. The layout engine will have been considerably enhanced by the editor's developers to allow for typing, pasting, deleting and moving the content. The goal is that, at all times during editing, the rendered result should represent what will be seen later in a typical web browser.

WYSIWIG editors are sometimes criticized because:

  • They generally do not generate the most efficient HTML and CSS code.
  • Users may be disappointed that the same page is rendered differently in different browsers

Valid HTML code

HTML is a structured markup language. There are certain rules on how HTML must be written if it is to conform to W3C standards for the World Wide Web. Following these rules means that web sites are accessible on all types and makes of computer, to able-bodied and handicapped people, and also on wireless devices like mobile phones and PDAs, with their extremely limited bandwidths and screen sizes.

WYSIWYG editors sometimes fail to adhere to these rules, turning out code that works to some degree but is syntactically incorrect, inefficient due to an unnecessary use of repetition, or based upon rules that have been deprecated for some years. Current W3C recommendations on the use of CSS with HTML were first formalised by W3C in 1996[1] and have been revised and refined since then. See CSS, XHTML, W3C's current CSS recommendation and W3C's current HTML recommendation.

These guidelines emphasise the separation of content (XHTML) from style (CSS) and the delivery of the style information only as necessary for a whole site, not repeated in each page, let alone in each HTML element. WYSIWYG editor designers have been struggling ever since with how best to present these concepts to their users without confusing them by exposing the underlying reality. Modern WYSIWYG editors all succeed in this to some extent, but many would say that none of them yet succeed totally.

However a web page was created or edited, WYSIWYG or by hand, in order to be successful among the greatest possible number of readers and viewers, as well as to maintain the 'worldwide' value of the Web itself it can be argued that, first and foremost, it should consist of valid markup and code. Some would argue that it should not be delivered by a designer to his or her customer, and not be considered ready for the World Wide Web, until its HTML and CSS syntax has been successfully validated using either the free W3C validator services (W3C HTML Validator and W3C CSS Validator) or some other trustworthy alternatives.

Whatever software tools are used to design, create and maintain web pages, there is little doubt that the quality of the underlying HTML is dependent on the skill of the person who works on the page. Some knowledge of HTML, CSS and other scripting languages as well as a familiarity with the current W3C recommendations in these areas will help any designer produce better web pages, with a WYSIWYG HTML editor and without[2].

Difficulties in achieving WYSIWYG

A given web page may not display the same on all browsers, for several reasons:

  • Different browsers and applications will render the same markup differently. The same page may display slightly differently in Internet Explorer and Firefox on a high-resolution screen, but it will look very different in the perfectly valid text-only Lynx browser. It needs to be rendered differently again on a PDA, an internet-enabled television and on a mobile phone. Usability in a speech or braille browser, or via a screen-reader working with a conventional browser, will place demands on entirely different aspects of the underlying HTML. Printing the page, using different browsers working with different printers and various paper sizes, around the world, places other demands. With the correct use of modern HTML and CSS there is no longer any need to provide 'Printable page' links and then have to maintain two versions of the whole site. Nor is there any excuse for pages not fitting the user's preferred paper size and orientation, or wasting ink printing solid background colours unnecessarily, or wasting paper reproducing navigation panels that will be entirely useless once printed out[3].
  • Browsers and computer graphics systems have a range of user settings. Resolution, font size, colour, contrast etc can all be adjusted at the user's discretion, and many modern browsers allow even more user control over page appearance[4]. All an author can do is suggest an appearance.
  • Web browsers, like all computer software, have bugs and may not conform to current standards. In this case, it can be hopeless for designers to try to design their pages around all of the common browsers' bugs: each time a new version of each browser comes out, a significant proportion of the World Wide Web would need re-coding to suit the new bugs and the new fixes! It is generally considered much wiser to design to standards, staying away from 'bleeding edge' features until they settle down, and then wait for the browser developers to catch up to your pages, rather than the other way round[5]. On this score, no-one can argue that CSS/XHTML is still 'cutting edge' as there is now widespread support available in common browsers for all the major features[6], even if many WYSIWYG and other editors have not yet entirely caught up[7].

What you see may be what most visitors get, but it is not guaranteed to be what everyone gets.

See also