Semantic XHTML - Part 2: Elements Within the <head> Element
Reader Level:
By writing semantic, valid XHTML, the code that you create for your web site will work not only cross browser, but cross device. The web page that works in your Firefox Browser on your Windows XP computer can work in a cell phone's browser, on TV via PlayStation, and even in a braille reader.
To write semantic code, you need to understand what every element means. This series covers all the HTML elements. Part II of the series covers the elements found in the <head> of the document, including <meta>, <title>, <link>, <script>, <base> and <style>.
The Semantic XHTML Series:
Semantic XHTML - Part 1: The Required Elements
Semantic XHTML - Part 2: Elements Within the <head> Element
Semantic XHTML - Part 3: Common Block Level Elements
Semantic XHTML - Part 4: List Elements
Semantic XHTML - Part 5: Table Elements
Semantic XHTML - Part 6: Inline Elements
Semantic XHTML - Part 7: The Phrase Elements
Semantic XHTML - Part 8: Empty Elements
Semantic XHTML - Part 9: The Image Element
Semantic XHTML - Part 10: Image Maps
Semantic XHTML - Part 11: The Object Element
Semantic XHTML - Part 12: The FORM Element
Semantic XHTML - Part 13: The INPUT Element
Semantic XHTML - Part 14: TEXTAREA and BUTTON Elements
Semantic XHTML - Part 15: Drop Down Menus
Semantic XHTML - Part 16: Organizing Forms
Semantic XHTML - Part 17: Non-Semantic Elements
Semantic XHTML - Part 18: INS, DEL & NOSCRIPT
Semantic XHTML - Table of XHTML Elements
Semantic XHTML - Part 1: The Required Elements
Reader Level:
By writing semantic, valid XHTML, the code that you create for your website will work not only cross browser, but cross device. The web page that works in your Firefox Browser on your Windows XP computer can work in a cell phone's browser, on TV via a PlayStation, and even in a braille reader. To write semantic code, you need to understand what every element means. In this series, we will cover all the HTML
This series will include:
- Part 1: The required elements to create a document:
- Part 2: Elements that go inside the document head
- Part 3: block level elements
- Part 4: Lists
- Part 5: Tables: Block level elements that aren't display: block
- Part 6: Common inline elements
- Part 7: The Phrase elements
- Part 8: Empty Elements
- And more....
There are several elements that we can use to create a valid XHTML document that is sematically correct. To code correctly, it is important to know all the elements, and especially to know when and how to use them. In part one of the Semantic XHTML series, we discuss the five elements that are required.
The Semantic XHTML Series:
Semantic XHTML - Part 1: The Required Elements
Semantic XHTML - Part 2: Elements Within the Element
Semantic XHTML - Part 3: Common Block Level Elements
Semantic XHTML - Part 4: List Elements
Semantic XHTML - Part 5: Table Elements
Semantic XHTML - Part 6: Inline Elements
Semantic XHTML - Part 7: The Phrase Elements
Semantic XHTML - Part 8: Empty Elements
Semantic XHTML - Part 9: The Image Element
Semantic XHTML - Part 10: Image Maps
Semantic XHTML - Part 11: The Object Element
Semantic XHTML - Part 12: The FORM Element
Semantic XHTML - Part 13: The INPUT Element
Semantic XHTML - Part 14: TEXTAREA and BUTTON Elements
Semantic XHTML - Part 15: Drop Down Menus
Semantic XHTML - Part 16: Organizing Forms
Semantic XHTML - Part 17: Non-Semantic Elements
Semantic XHTML - Part 18: INS, DEL & NOSCRIPT
Semantic XHTML - Table of XHTML Elements
Vertically Align Labels and Inputs with CSS
Reader Level:
Although forms where the labels are placed above the input fields they describe are considered to be more usable, there are undoubtedly going to be times where you need to use a form layout where the labels are placed to the left of their input fields with right-aligned text. This tutorial will teach you the basic (X)HTML structure and CSS to do just that. It assumes you're already familiar with the building blocks of forms and how to use them correctly to build accessible forms: fieldset, legend, label and input elements.
In a followup tutorial, you will learn how to build on this basic structure to accommodate more versatile form content, including checkboxes, radio buttons, textareas with long labels, and instructional text.
CMX JumpStart: Metropolis
Reader Level:
CMX JumpStart Metropolis is a two-column, hybrid layout that has a fluid left column and a fixed-width right column. It includes rounded corners on its right side, and employs faux column technique to achieve equal height columns. It has a footer as well as a fixed header that remains in view even as the visitor scrolls the page - a property that is now supported by Internet Explorer 7. It features styled unordered lists for the navigation, styled skip links, min and max width, and has a placeholder for a photo gallery. Finally, there are several style sheets involved: a main style sheet, a style sheet for print, and a style sheet for all of the special Internet Explorer rules. And of course, as always, Metropolis validates for XHTML 1.0 Transitional, CSS 2.1, and 508 and WAI accessibility.
Approximate download size: 7.1MB
PHP Formmail Spam Prevention
Reader Level:
It used to be that there were clear sides in the junk email battle: the spammers and the spammed. I always considered myself a member of the latter group, and then one day I became a member—inadvertently—of the former. I had become a victim of the email injection attack via a PHP formmail script.
In this update to the Dreamweaver Creating and Processing Form series, we'll take a new look at the phpformmail script and demonstrate how to use a key and email value pair to keep your email address out of the html page.
Spell Checking HTML Forms with JavaScript and PHP
Reader Level:
Have you ever had to write a large amount of text into a field on an HTML form and been uncertain of just how reliable your spelling skills are? Wouldn't it be nice if HTML forms, like most other applications, had one of those handy little "Spell Check" buttons? In this article we'll look at how easy it is to implement this functionality using a PHP/JavaScript solution called Speller Pages.
Adding WYSIWYG to Textareas: Part 1
Reader Level:
One of the problems web developers encounter when allowing clients or users to insert content dynamically is ensuring that the outputted content still conforms to the standard of code required from a modern web site. The average site user knows little or nothing of HTML syntax, and certainly not enough to ensure that your precious pages still meet HTML syntax validation.
Many solutions have been created in order to solve this problem, BB style syntax is one of those; but the majority of users would probably prefer to be able to format their text as they would in a product like Microsoft Word. The generic word processor environment is something that's familiar to almost everyone who uses a personal computer. So, let's say we could actually allow people to insert data as clean HTML using a simple word processing interface, wouldn't that be cool? :) We can, and as a bonus we can easily implement it into a generic Dreamweaver "Insert Record" page.
Introduction to CSS Table-Related Display Values
Reader Level:
One of the hardest things for web designers new to CSS layout to get their heads around is that divs don't act like table cells, the traditional building blocks of page layouts. Table cells automatically expand to hold their content, match each other in height, and stack horizontally, but divs don't do these things, making CSS layouts that emulate table layouts tricky. However, there's an easy way to get your divs to act like table-cells: tell them to using the display property. This article will introduce the table-related values of the display property of CSS 2.1 that allow you to make any non-table HTML element act like any table element. In the article following this one, you'll then learn how to use these display values to create a pure CSS layout that emulates the behavior of a table layout
Managing HTML and CSS to Keep Clients Happy and Avoid 'Disaster' - Part One
Reader Level:
Web design is a complex craft, made even more complex by the need to deal with clients, co-workers from other fields, and the ongoing changes in software, hardware, and the business landscape. While a lot of these things can be understood only through experience, there are still plenty of simple problems that could easily be avoided if they were known about in advance.
In this series we intend to discuss some of the 'dumb mistakes' (caused by simple ignorance) that happen when advancing coders start to use their newly won skills in the real world, to earn actual money. These common errors can't all be covered, there's just too many ways to go wrong, but we'll make a serious attempt to address the major issues. So sit back and learn about the things we and others have goofed up, over and over and over...
The Managing HTML and CSS to Keep Clients Happy Series:
Managing HTML and CSS to Keep Clients Happy and Avoid 'Disaster' - Part One
Managing HTML and CSS to Keep Clients Happy and Avoid 'Disaster' - Part Two
Managing HTML and CSS to Keep Clients Happy and Avoid Disaster - Part Three
Creating the Print Style Sheet for Vienna: Part Two
Reader Level:
In
Part One of this series we explored reasons why we might want to include a print style sheet in our web pages. We especially focused on the problems many browsers have with printing out CSS layouts unless we make changes to floats and any positioning other than static. We looked at the various ways to attach a print style sheet, and we reconstructed Vienna's print style sheet.
Now we'll look at some of the paged media properties in the CSS2 specifications that, if better supported, could provide almost as much sophisticated control as there is in print production. Next we'll look at creating page breaks and solving margin problems. And finally, we'll look at generated content in general, and especially focus on the attr() function that enables us to automatically print full URLs after link text by using the content property in conjunction with the :after pseudo class.
Rollovers: Fireworks vs. Dreamweaver
Reader Level:
Q."Should I do image rollovers in Fireworks or Dreamweaver? I've heard it's better to do them in Dreamweaver."
I've read many posts in the Dreamweaver forum warning people away from using Fireworks image rollovers, "because Fireworks produces bloated code" compared with Dreamweaver's. No doubt I'll stir up a hornets' nest with this tutorial, but let's do image rollovers in both Fireworks and Dreamweaver so you can see the difference and decide for yourself.
CSS: Getting Into Good Coding Habits
Reader Level:
In this article we will look at what I would consider to be good coding practices when laying out a CSS design and building your style sheet.
We will look at how we can make our style sheets more manageable through the use of comments and see how we can use our style sheets to their greatest effect.
Introducing the CMX CSS Snippet Collection - Part One
Reader Level:
CSS Positioning layouts are hot, and many people are trying to make the transition from the mostly reliable, but non-semantic, table-based layouts we've all used for years. CSS 2.1 provides great features for laying out pages, and the specs for CSS 3 indicate that some day the future of design on the web will be ever brighter indeed.
We here at CMX try to make the learning curve as painless as possible with our many CSS tutorials and articles. Now we'd like to offer you a diagnostic tool that spares you some typing and memorizing. We are proud to introduce the CMX CSS Snippets Collection. Snippets, as you may well be aware, are bits of reusable code that paste as blocks or around selections with the click of an insert button.
This article includes an extension for installing part one of the collection into the Dreamweaver Snippets panel, and a tutorial that explains the problems and solutions that the hacks correct.
Part One of the CMX CSS Collection includes the following:
- Caio Hack
- Anti-Caio Hack
- IE Mac only
- IE Mac only 2
- Hide from Mac
- Holly Hack
- Box Model Hack
- Tan Hack
- Tan Hack and Anti-Mac combined
- 6 IE Conditionals for all IE, 5.0, 5, 5.5, gte 5.5, and 6
Read on and bust those bugs!
Introducing the CMX CSS Snippet Collection - Part Two
Reader Level:
CSS Positioning layouts are hot, and many people are trying to make the transition from the mostly reliable, but non-semantic, table-based layouts we've all used for years. CSS 2.1 provides great features for laying out pages, and the specs for CSS 3 indicate that some day the future of design on the web will be ever brighter indeed.
We here at CMX try to make the learning curve as painless as possible with our many CSS tutorials and articles. Now we'd like to offer you a diagnostic tool that spares you some typing and memorizing. We are proud to introduce the CMX CSS Snippets Collection. Snippets, as you may well be aware, are bits of reusable code that paste as blocks or around selections with the click of an insert button.
This article includes an extension for installing part two of the collection into the Dreamweaver Snippets panel, and a list that explains the problem and then the solution that each snippet corrects.
Our Snippets in Part Two include the following:
- Win IE fully clickable CSS buttons
- Win IE text inheritance in tables
- Win IE double float margin
- Win IE three pixel gap bug
- Win IE three pixel gap bug part 2
- Win IE missing image bug
- IE word wrap
- IE expanding boxes and too wide images
- Set text size on the body
- Set font-size and family on multiple selectors for NS4
- Zero margins on multiple elements
- Clearing element for floats
- Easy clearfix for floats
- Floating an image to the left
- Floating an image to the right
- Clearing a float after an image
- Centered layouts that work
Read on and bust those bugs!
Fireworks Hotspot Rollovers
Reader Level:
Everyone knows that web images are rectangular. If you want a navigation system made of image rollovers, you have to make them out of stacks of rectangles, or horizontal arrays of rectangles. Rectangles to the left. Rectangles to the right. Rectangles over and under. Gets boring, eh?
Debunking Alt Text Myths
Reader Level:
With accessibility getting more press these days and the requirement to include the alt attribute on all images now part of the HTML and XHTML Strict specifications, more web developers than ever are finally providing alt text on their images. But the type of alt text you provide plays a tremendous role in how accessible your page truly is. When used incorrectly, alt text can actually hinder accessibility! This article will debunk four myths regarding the use of alt text so that developers can provide alt text that is more useful to non-visual users. Learn how to provide alt text that maximizes your page's accessibility in a real way rather than just satisfies automated accessibility checkers.
Using Image Metadata in PHP - Part 2
Reader Level:
In
Part
1 we took at look how to read metadata from images in PHP using the JPEG-Meta class. This time around we take a look at how to use the same class to write and update metadata back to our images, giving us a complete JPEG metadata solution for our PHP applications.
Styling Forms: Fieldset and Legend
Reader Level:
In my last form tutorial, we looked at creative ways to use CSS to style label, input, select and textarea field elements. This time, we're going to move on to fieldset and legend. These elements will boost the accessibility of your form in most cases as well as really add a lot of style to your web site when handled correctly. Your forms don't have to be unattractive. In this tutorial, you'll learn about the styling options of these two form elements as well as some of the more stubborn gotchas and how to work around them. Source files to begin the tutorial, the gradient png and the final example, with commented CSS, are included.
Validating Forms to xhtml strict
Reader Level:
In this tutorial we will investigate the requirements that need to be met when validating our forms to the xhtml 1.0 strict standard. We'll look at the elements we have available to us and how we can style them with CSS.
Semantic (X)HTML Markup: Blockquote, Q, and Cite
Reader Level:
(X)HTML contains three semantic elements you can use to mark up text on your web page that comes from or names an external source: blockquote, q, and cite. Although blockquote is widely (and, very often, wrongly) used across the web, q and cite are relatively unknown and underused.
The fourth article in the Semantic (X)HTML series introduces these elements, teaches you when and how it's appropriate to use each, and discusses browser shortcomings in the support of these tags so you can be sure you're using them in a way that's cross-browser compatible. You'll also learn how to use CSS in conjunction with these elements to produce unique visual styling.
The Semantic (X)HTML Markup Series:
Semantic (X)HTML Markup: An Introduction
Semantic (X)HTML Markup: Headings and Paragraphs
Semantic (X)HTML Markup: Creating Emphasis
Semantic (X)HTML Markup: Blockquote, Q, and Cite
Semantic (X)HTML Markup: Structuring Lists
Semantic (X)HTML Markup: Styling Lists
Semantic (X)HTML Markup: Using Tables Appropriately
Semantic (X)HTML Markup: Styling Tables
Semantic (X)HTML Markup: Phrase Elements
Semantic (X)HTML Markup: Other Elements
Do You Want To Do That With CSS? — Centering a Wrapper
Reader Level:
This article will deal with one of the most basic problems encountered when developing a tableless design, namely getting a fixed width "page wrapper" element to center at all window resolutions and in all modern browsers. We'll review what a wrapper is, explain how to center it, and then discuss how to get IE5.x/Win browsers to cooperate. Finally, we'll touch on a little Gecko-based problem with the method, and ways to overcome that, as well. Join us.
Common Coding Problems with HTML and CSS - Part Two
Reader Level:
Last time, the 'gotchas' were general web coding problems but now we turn to some headaches directly related to CSS and positioning. Don't be scared! These beasties are pushovers if you know their weaknesses. Ready to kick some bug backside? Let's roll!
Common Coding Problems with HTML and CSS - Part One
Reader Level:
Coders learning CSS, and others as well, often run into frustrating problems that chew up time and produce major headaches. What's worse, these problems are usually known to others who have gone through the same mill. In an attempt to ease the path of others, we have identified a number of common coding 'gotchas' so you won't have to re-invent the wheel. Please proceed...
The Benefits of Externalizing Fireworks Pop-up menu JavaScript
Reader Level:
Fireworks and Dreamweaver pop-up menus have their uses, in spite of all the critics. One nagging issue though, is that both DW and FW insist on dumping a hefty javascript function into EVERY page that makes use of the menu. This article shows you how to turn this internal js into an external file, and how to link it to the pages that need the pop up menu.
Rendering Mode and Doctype Switching
Reader Level:
Even though today's browsers have moved toward more standards-compliant behavior, it is still necessary to allow older pages to display as they have in the past. However, this can cause problems with modern pages written to (x)HTML and CSS standards if a browser cannot determine how to best render the page. The solution? Come learn about Rendering modes and the "Doctype Switch."
Creating a Multi-Page Form
Reader Level:
Create a form that carries over several pages. This is useful for loan applications, lengthy registration pages, etc.