May
14



When I write an article–or any web page, for that matter–I like to begin with basic HTML, XHTML, and CSS documents I know contain valid code. After reading this tutorial, you will be able to use this approach, too.

There are two types of basic, standards-based documents that I use to write web pages. The first has a Document Type Definition(DTD) of XHTML 1.0 Transitional, just like WordPress uses. The second is a basic HTML document with a Document Type Definition(DTD) of HTML 4.01 Transitional. These definitions tell the browser which specification the document uses. For example, the DTD would be used to tell a browser if the document was HTML or XHTML. The DTD is the first line of code in a web page.

The syntax rules for HTML and XHTML are different in some ways. You must use the correct syntax for the DTD you use or your code will not pass at W3C.This is so even though the browser you use might display your page as expected: browsers are very forgiving with respect to non-standard code.

For the content on my web site, I use the HTML 4.01 Transitional DTD because I am comfortable with its syntax.

The best way to insure that you are starting with a standards-based web page is to first copy a known good skeletal web page and paste it into a basic text editor. Next, save the code as a text file with the “.txt” extension. You could name the file, my-html-template.txt.

You can also paste the code into the W3C Markup Validation Service to check that it is up to snuff: if the code passes the validator “in the green,” you know your code is good. Simple skeletal web pages, can be found at W3 Schools. Other code, such as the DTD for HTML and XHTML, can also be found there.

It is very common to find that online web pages fail W3C validation with a massive number of errors. Sometimes this is because the wrong DTD is specified for a page; at other times, the failure is due to using non-standard or deprecated code. If you start with a valid, basic template and correct any validation errors that show up, your pages will always be “in the green” when they are published to the Web.

Once you have a valid basic template, you can begin to add your content between the body tags and extra code between the head tags.

Normally, I do not use hard carriage returns inside a paragraph. The editors I use all have a “word wrap” feature that enables me to see all the text I write without having to use the horizontal scroll bar. The actual line length of the published content will be determined later when the page display is styled.

I do use a hard carriage return after the last sentence of a paragraph and add an extra one between paragraphs. Hard returns can also be added for extra space between other elements, such as image code.

If you have added content to the my-html-template.txt file, save it again with a “.html” file extension. You can then open it in a browser. What you will see is that all of the content runs together. That is because browsers look for line break tags and not carriage returns. You can fix this by doing a find and replace with your editor: just find every carriage return and replace it with a break tag. When you open the HTML document again, the various parts of the content will be neat and tidy but not very pretty. CSS styling will fix this.

If you are just “dropping” the content between the body tags into a visual editor on the web, such as a WordPress editor or the article content box at EzineArticles, you don’t have to worry about the line breaks as they will be added to the HTML code for you.

Copy and paste the CSS code below into your text editor. Save it as “my-template. css” in the same folder in which you saved your HTML template file.

body

{

background: #fffef2;

color: black;

line-height: normal;

margin: 3% 25% 3% 25%;

min-width: 400px;

}

The link meta tag associates a CSS file with the HTML document. Copy and paste the link tag shown below between the head tags in the my-html-template.txt file you saved. Replace the bracket characters with “”, respectively.

[link title="Template Style Sheet" rel="stylesheet" href="my-template.css"type="text/css"]

If you have added some content to your my-html-template.txt file,

0
May
14



They came oh so close in 2007. Having made their first NBA finals, the Cleveland Cavaliers appeared to be destined for greatness. Even though they were swept by the Spurs that season, LeBron James was young and constantly improving his game.

2008 came around, and the Boston Celtics had a bolstered roster that was simply too strong for the Cleveland Cavs. They nearly defeated them, but Boston marched on and captured an NBA title under the leadership of Kevin Garnett, Paul Pierce, and Ray Allen.

During the 2008-2009 season, the Cavs looked like the team to beat. Boasting the best home record in the NBA (they had a 39-2 home record), the Cleveland Cavaliers also had the best record in the NBA. A 66-16 finish gave them the top seed in the Eastern Conference and home court advantage throughout the entire playoffs. It looked like it’d be the year for Cleveland.

Unfortunately, the team’s run was spoiled by the Orlando Magic. This left Cleveland fans wondering if Dwight Howard and the Magic had the Cavs’ number, and what could be done about this.

Surely, the team was lacking in the big man department. Enter Shaquille O’Neal. The Cavs now enjoy the presence of the big man on their roster, and will look to use his physical prowess and playoff experience to bring home an NBA title. There’s a lot on the line, and the Celtics and Magic have both made some big moves themselves during the off season.

This may or may not be enough, but one thing’s for sure. The Cavs are stronger this year than they were last year. And that’s scary.

0