Friday, April 29, 2011

HTML Colors - VI


In HTML, colors can be added by using the style attribute. You can specify a color name (eg, blue), a hexadecimal value (eg, #0000ff), or an RGB value (eg rgb(0,0,255)).

Syntax

Foreground Color

To add color to an HTML element, you use style="color:{color}", where {color} is the color value. For example:
<h3 style="color:blue">HTML Colors</h3>
This results in:

HTML Colors

Background Color

To add a background color to an HTML element, you use style="background-color:{color}", where {color} is the color value. For example:
<h3 style="background-color:blue">HTML Colors</h3>
This results in:

HTML Colors

Border Color

To add a colored border to an HTML element, you use style="border:{width} {color} {style}", where {width} is the width of the border, {color} is the color of the border, and {style} is the style of the border. For example:
<h3 style="border:1px blue solid;">HTML Colors</h3>
This results in:

HTML Colors

Color Names

The most common methods for specifying colors are by using the color name or the hexadecimal value. Although color names are easier to remember, the hexadecimal values and RGB values provides you with more color options.
Hexadecimal values are a combination of letters and numbers. The numbers go from 0 - 9 and the letters go from A to F. When using hexadecimal color values in your HTML/CSS, you preceed the value with a hash (#). Although hexadecimal values may look a little weird at first, you'll soon get used to them.
There are 16 color names (as specified in the HTML 4.0 specification). The chart below shows these color names and their corresponding hexadecimal value.
ColorColor NameHexadecimal ValueColorColor NameHexadecimal Value
Black#000000Green#008000
Silver#c0c0c0Lime#00ff00
Gray#808080Olive#808000
White#ffffffYellow#ffff00
Maroon#800000Navy#000080
Red#ff0000Blue#0000ff
Purple#800080Teal#008080
Fushia#ff00ffAqua#00ffff
You can make up your own colors by simply entering any six digit hexadecimal value (preceeded by a hash). In the following example, we're using the same code as above. The only difference is that, instead of using "blue" as the value, we're using its hexadecimal equivalent (which is #0000ff):
<h3 style="color:#0000ff">HTML Colors</h3>
This results in:

HTML Colors

If we wanted to change to a deeper blue, we could change our hexadecimal value slightly, like this:
<h3 style="color:#000069">HTML Colors</h3>
This results in:

HTML Colors

Choosing Colors - The Easy Way

By using hexadecimal or RGB color values, you have a choice of over 16 million different colors. You can start with 000000 and increment by one value all the way up to FFFFFF. Each different value represents a slightly different color.

HTML Attributes - V


HTML tags can contain one or more attributes. Attributes are added to a tag to provide the browser with more information about how the tag should appear or behave. Attributes consist of a name and a value separated by an equals (=) sign.

Example

Consider this example:

HTML Formatting - IV


You may be familiar with some of the formatting options that are available in word processing applications such as Microsoft Office, and desktop publishing software such as QuarkXpress. Well, many of these formatting features are available in HTML too! This lesson contains some of the more common formatting options.

Headings

There is a special tag for specifying headings in HTML. There are 6 levels of headings in HTML ranging from h1 for the most important, to h6 for the least important.
Typing this code:

HTML Elements - III


HTML elements are the fundamentals of HTML. HTML documents are simply a text file made up of HTML elements. These elements are defined using HTML tags. HTML tags tell your browser which elements to present and how to present them. Where the element appears is determined by the order in which the tags appear.
HTML consists of almost 100 tags. Don't let that put you off though - you will probably find that most of the time, you only use a handful of tags on your web pages. Having said that, I highly recommend learning all HTML tags eventually - but we'll get to that later.
OK, lets look more closely at the example that we created in the previous lesson.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>HTML Tutorial Example</title>
</head>
<body>
<p>Less than 5 minutes into this HTML tutorial and
I've already created my first homepage!</p>
</body>
</html>
Explanation of the above code:
  • The <!DOCTYPE... > element tells the browser which version of HTML the document is using.
  • The <html> element can be thought of as a container that all other tags sit inside (except for the !DOCTYPE tag).
  • The <head> tag contains information that is not normally viewable within your browser (such as meta tags, JavaScript and CSS), although the <title> tag is an exception to this. The content of the <title> tag is displayed in the browser's title bar (right at the very top of the browser).
  • The <body> tag is the main area for your content. This is where most of your code (and viewable elements) will go.
  • The <p> tag declares a paragraph. This contains the body text.

Closing your tags

As mentioned in a previous lesson, you'll notice that all of these tags have opening and closing tags, and that the content of the tag is placed in between them. There are a few exceptions to this rule.
You'll also notice that the closing tag is slightly different to the opening tag - the closing tag contains a forward slash (/) after the <. This tells the browser that this tag closes the previous one.

UPPERCASE or lowercase?

Although most browsers will display your page regardless of the case you use, you should always code in lowercase. This helps keep your code XML compliant (but that's another topic).

Therefore...Good:<head>
Bad:<HEAD>

In the next lesson, we learn about some of the more common formatting tags.

Getting Started - II


OK, lets get straight into it. Here, you will learn just how easy it is to create a web page. In fact, by the time you've finished with this web page, you will have created your own web page!
When you create a web page you will usually do something like this:
  1. Create an HTML file
  2. Type some HTML code
  3. View the result in your browser
  4. Repeat the last 2 steps (if necessary)

Creating a Webpage


About HTML - I

HTML, which stands for HyperText Markup Language, is a markup language used to create web pages. The web developer uses "HTML tags" to format different parts of the document. For example, you use HTML tags to specify headings, paragraphs, lists, tables, images and much more.
HTML is a subset of Standard Generalized Markup Language (SGML) and is specified by the World Wide Web Consortium (W3C).

What do I need to create HTML?

Wednesday, April 27, 2011

Animated GIFs


Don't you just love going to a page with plenty of info but everything's just crying out "look at me! Look at ME!!!"? Animated gifs have had plenty of practice at saying that. Not only that, there are so many that aren't convincing. Whoever created it was so busy trying to make the object move, that they didn't take into account the shape transitions of the actual object as it moved. Lost? I'll explain...
Take a bouncing ball for example. Now, if it isn't as hard as a rock, when it hits the ground, it will morph a little (squash up). One way to create convincing animations is to exaggerate this kind of thing so that it morphs a lot. This kind of thing is one of the things that makes a good animator. A good animator will be able to exaggerate all sorts of facial expressions of a character to bring it to life!
For the purposes of this article, we will stick to the good old bouncing ball scenario. If you look closely when it hits the ground, it reaches a pretty strong oval shape before bouncing back to its original shape.
It's a good thing to remember whenever you want a convincing 'cartoon style' animated gif.

Web Design Glossary


CSS
In web design, CSS stands for Cascading Style Sheets. CSS allows web designers to control the style and layout of websites. One powerful feature of CSS is that styles can be declared in an external style sheet. All web pages can then link to the one style sheet. If you need to update the styles across the whole website, you only need to change one file.
FTP
FTP stands for File Transfer Protocol. FTP is the common protocol used to transfer files across the internet.

GIF vs JPEG


Many web authors save images in the wrong format. I've lost count of the number of times I've seen a JPEG image on the web when it should really have been saved as a GIF. I can usually tell just by looking at the image.

What is the difference between GIF and JPEG?

GIF

GIFs can display anything up to 256 colors. You can use image editing software (such as Adobe Photoshop or GIMP) to manipulate each individual color to provide you with a nice crisp image. You can also reduce the number of colors so that the image is smaller and loads faster on your web page.

Tuesday, April 26, 2011

SQL Server - Summary - XV


Congratulations for reaching the end of this SQL Server tutorial!
SQL Server is a powerful application, and this tutorial has provided an overview of the main concepts involved in administering SQL Server 2008 Express.
To recap briefly, we've:
  • Created databases
  • Created database tables
  • Inserted data into those tables
  • Used the SSMS to run a query
  • Created a login account
  • Looked at server roles
  • Learned about database schemas
  • Looked at linked servers
  • and more

What Next?


SQL Server Integration Services (SSIS) - XIV


SQL Server Integration Services (SSIS) allows you to integrate smoothly with other applications and data sources.
You can use Integration Services to copy or download files, send e-mail messages in response to events, update data warehouses, clean and mine data, and manage SQL Server objects and data.
In SQL Server 2005 and higher, Data Transformation Services (DTS) is no longer installed with SQL Server. All DTS related tasks are now performed with SSIS.

Where Has DTS Gone?


SQL Server - Linked Servers - XIII


If you've been navigating around SQL Server Management Studio (SSMS), you may have come across the Linked Servers option.
The Linked Servers option allows you to connect to another instance of SQL Server running on a different machine, perhaps remotely in a different city/country. This can be useful if you need to perform distributed queries (query a remote database). Setting up a linked server is quite straight forward in SSMS, all you need is details of the remote server, and the database that you need to query.

Creating a Linked Server

To create a linked server:


SQL Server - Database Schemas - XII


Ever since SQL Server 2005 was released, each object in a database has belonged to a database schema. SQL Server 2008 has continued with database schemas, and an explanation follows.

What is a Database Schema?

A database schema is a way to logically group objects such as tables, views, stored procedures etc. Think of a schema as a container of objects.
You can assign a user login permissions to a single schema so that the user can only access the objects they are authorized to access.
Schemas can be created and altered in a database, and users can be granted access to a schema. A schema can be owned by any user, and schema ownership is transferable.

Monday, April 25, 2011

SQL Server - Server Roles - XI


When creating a new user login in SQL Server, you get the option of assigning the login one or more server roles.
Server roles (not to be confused with database roles) are available for various database administration tasks. Not everyone should be assigned to a server role. In fact, only advanced users such as database administrators should be assigned a server role.

Accessing the Server Roles


SQL Server - User Logins - X


SQL Server allows for the creation of user logins. Each individual who needs access to SQL Server can be given their own user account.
When the administrator configures these user logins, he/she can assign them to any number of roles and schemas, depending on the access that the individual is entitled to.
In this lesson, we will walk through the steps in creating a user login.

To Create a New User Login