Posts Tagged ‘html’

HTML & XHTML Validation: A Love Story

Photo by bruckneriteIf you’re relatively new to web design, you’re probably still learning how to get your pages to look the same in all browsers. Even more important, though, is learning how to get your pages to function correctly in all browsers.

The most arduous way of doing this is to open your site in every browser—at least the major ones—and check the functionality of every link, every Flash element, and so on. Of course, even if you’re willing to take the time to do this, you have no guarantee that the invisible elements of your site—your meta tags and doctype tags, for instance—are working correctly.

The only way to ensure that your site has been properly coded is to validate it in order to confirm that it adheres to accepted web standards. So, how do you do this? Well, let me introduce you to your new best friend, the W3C Markup Validation Service.

Tags: html, web design, xhtml
Posted in Design, HTML/XHTML, Web Development | No Comments »

3 Suggestions for CSS Beginners

Photo by eelke dekkerStill somewhat new to CSS?  Below are three suggestions to help improve your coding:

1) External, Not Internal

There are three ways to apply CSS styles to your web site:

  1. Use Internal CSS
  2. Use Inline CSS
  3. Use an External Style Sheet

Internal (or “embedded”) CSS is a set of CSS properties specified within the head tags of your page.  For instance, if you want the background of your page to be black, you could do this:

<html>
<head>
<title>My Web Site</title>
<style type="text/css">
body {
          background-color: #000;
}
</style>
</head>

Inline CSS is similar, except that the properties are applied directly to specific elements within the page.  For instance, if you want one paragraph to have a 20px margin above it, you could do this:

<p style="margin-top: 20px">This is my sample paragraph.</p>

Tags: CSS, html, web design, xhtml
Posted in CSS, Design, Web Development | No Comments »