All posts tagged ‘HTML’

File Under: Glossary

Parse


To parse means to break something down into units that can be analyzed. To parse a sentence means to break it down into its parts of speech. In computer terms, a compiler must parse source code so that it can be analyzed and then assembled into object code. An XML parser, for example, is a tool for reading eXtensible markup language documents. XML parsers can pass data to a browser if that data is “well-formed.” XML doesn’t provide an application programming interface (API) to an application, it just passes data to it. Both Microsoft and Netscape include XML parsers in their browsers.

File Under: Glossary

Inline Stylesheet

As opposed to a linked stylesheet, an inline stylesheet is included within an HTML document.

It is directly associated with a particular element, and the appearance of the document cannot easily be changed. The advantage is that the presentation of the document can be separated into the global style contained in the
<HEAD>
tag , and HTML can be used more appropriately for the document’s structure. Using an inline stylesheet at the beginning of the document allows the style and rendering to be modified without changing the HTML. On the other hand, using a linked stylesheet can be more efficient for a set of pages, because a linked style can be defined through a single file. Changing the entire website with a linked stylesheet can be done just by modifying the linked stylesheet file.

File Under: HTML

Position Text and Images With Div Tags

Are you sick of putting align in every tag just to get a page to lay out properly? And how do you feel about table hacks for positioning images? I thought so. Well, never fear – the <div> tag is here.

Although it’s been around since HTML 3.0, <div> didn’t really catch on until CSS-based layouts became the rage du jour. It won’t solve all your problems, but it works for formatting large blocks of text, images, and just about anything else that has an HTML tag around it.


Continue Reading “Position Text and Images With Div Tags” »

File Under: Glossary

Link

A link is a bit of highlighted text on a web page that connects to another web page or file. Clicking the link sends your browser in search of the address attached to the text. That address can refer to another place on the same page, another page within the same site, or just about anywhere on the internet. If you could peel back the text of the link to Webmonkey and view the HTML underneath, you’d see:

<a href="http://www.webmonkey.com/">Webmonkey</a>

If you clicked on the text of the link, you would be taken to that URL.

File Under: HTML, Web Standards

Building with the Document Object Model

How would you describe your web page without mentioning its content?

One way would be to describe the page’s structure. What tags are on the page? How many are there? What order are they in? What are the properties of these tags? And finally, what is the presentational nature of each element? This is what the Document Object Model does. It expresses the structure of an HTML document in a universal, content-neutral way.

One of my first Webmonkey articles was about displaying random images. I twiddled with image tags on a page so they pointed to different image files over time. It was a simple concept: You have an arbitrary number of images on a page, a few of which the computer would randomly change about five times a second. The effect was a flashing, mutating space that I liked a lot.

I didn’t know it back then, but what I was doing was manipulating the Document Object Model of that page. I had a number of objects on the page. My script would then query out the number of images, and then modify an attribute of that object (i.e., switch out the sources of the images).

This was about the limit of what you could do with the Document Object Model in Netscape 3. You could read and write the attributes of image and anchor tags, and you could query some information about the browser itself – what MIME-types it accepted, what plug-ins were installed, its location, and a few other things. Simple, basic, down-to-earth, level-zero items.

Continue Reading “Building with the Document Object Model” »