• The Gay Adult Market – Gay Subcultures

    Date: 2011.02.24 | Category: Promotion | Response: 0

    I thought I would take a break from writing about online adult marketing for a change and instead, give many of the straight webmasters looking to break into the gay market a bit of an insight into what makes a gay man ‘tick’ and, whilst this is going to be different from guy to guy, the one thing that will remain constant throughout is that this article is based on the gay lifestyle and subculture in both society and, the internet.

    What Is A Subculture?

    Lets start at the beginning shall we? To understand this article you are first of all going to need to understand what a subculture is well, a subculture as defined by http://www.dictionary.com is, ‘A cultural subgroup differentiated by status, ethnic background, residence, religion, or other factors that functionally unify the group and act collectively on each member.’

    In layman’s terms, that means, that a subculture is a group of people (or individual) that have something different about them than other people.

    In the instance of this article we are going to be looking at the gay subculture and specifically, how this culture is broken down into its own set of subcultures.

    The Gay Subculture – Lets Define The Gay Culture.

    Gay culture is the heritage of culture, knowledge, and references to which gay people fall heir by the fact of their sexual orientation.

    Some individuals argue that there are to many gay people who do not participate in ‘gay culture’ for the concept to be meaningful or that gay culture in itself is placing labels on the stereotype most people think of when they thing about gay people however with this said, there are also those who argue the flip side of the coin. One thing is for sure however, gay culture certainly does exist and, within this culture itself there are many complex facets ranging from sexual preferences through to the types of vacation people take.

    Gay Subcultures – The Facets.

    Whether we choose to think about the different subcultures within the gay community or not one thing is for certain, the subcultures in our community are wide and far reaching from your local gay bar to Soho in a city thousands of miles away most of the gay subcultures can be found almost anywhere in the world and, from this aspect, it makes gay individual no different than other person. For example, the BDSM lifestyle is large in the straight culture however, it is also hugely popular in the gay culture to often with groups of individuals who devote their whole way of life to this. In essence however, many of the gay subcultures are no different to that of their straight counterparts the only difference being, the individuals who practice them, are gay.

    Gay Subcultures – An Overview.

    For many webmasters who currently work in the straight market their first attempt and even their second attempt at marketing to the gay lifestyle may fail however, many do not realize the simplest of rules when it comes to marketing products and services to gay individuals online, you need to be as, if not more, detailed and direct to gay surfers than straight, give them something they can find anywhere at anytime and the chances are they will not buy however, give them something that suits their tastes perfectly and you have a customer for life.

    Article written by Lee

  • Displaying Special Characters On Your HTML Pag

    Date: 2011.02.22 | Category: WebDesign | Response: 0

    In order to display certain characters within your HTML pages, you must use a special code. The codes below display the HTML code and the character when displayed on your web page. To use any of the characters displayed within the chart, copy & paste the HTML code to the left of the character you would like to use.

    HTML Code Browser View HTML Code Browser View HTML Code Browser View HTML Code Browser View
    © © ! ! _ _  
    ® ® " ` ` ž ž
      # ` a a Ÿ Ÿ
    " $ $ b b  
    & & % % c c ¡ ¡
    &lt; < &#38; & &#100; d &#162; ¢
    &gt; > &#39; &#101; e &#163; £
    &Agrave; À &#40; ( &#102; f &#164; ¤
    &Aacute; Á &#41; ) &#103; g &#165; ¥
    &Acirc; Â &#42; * &#104; h &#166; ¦
    &Atilde; Ã &#43; + &#105; i &#167; §
    &Auml; Ä &#44; , &#106; j &#168; ¨
    &Aring; Å &#45; &#107; k &#169; ©
    &AElig; Æ &#46; . &#108; l &#170; ª
    &Ccedil; Ç &#47; / &#109; m &#171; «
    &Egrave; È &#48; 0 &#110; n &#172; ¬
    &Eacute; É &#49; 1 &#111; o &#173; ­
    &Ecirc; Ê &#50; 2 &#112; p &#174; ®
    &Euml; Ë &#51; 3 &#113; q &#175; ¯
    &Igrave; Ì &#52; 4 &#114; r &#176; °
    &Iacute; Í &#53; 5 &#115; s &#177; ±
    &Icirc; Î &#54; 6 &#116; t &#178; ²
    &Iuml; Ï &#55; 7 &#117; u &#179; ³
    &ETH; Ð &#56; 8 &#118; v &#180; ´
    &Ntilde; Ñ &#57; 9 &#119; w &#181; µ
    &Otilde; Õ &#58; : &#120; x &#182;
    &Ouml; Ö &#59; ; &#121; y &#183; ·
    &Oslash; Ø &#60; < &#122; z &#184; ¸
    &Ugrave; Ù &#61; = &#123; { &#185; ¹
    &Uacute; Ú &#62; > &#124; | &#186; º
    &Ucirc; Û &#63; ? &#125; } &#187; »
    &Uuml; Ü &#64; @ &#126; ~ &#188; ¼
    &Yacute; Ý &#65; A &#127; ? &#189; ½
    &THORN; Þ &#66; B &#128; &#190; ¾
    &szlig; ß &#67; C &#129;  &#191; ¿
    &agrave; à &#68; D &#130; &#192; À
    &aacute; á &#69; E &#131; ƒ &#193; Á
    &aring; å &#70; F &#132; &#194; Â
    &aelig; æ &#71; G &#133; &#195; Ã
    &ccedil; ç &#72; H &#134; &#196; Ä
    &egrave; è &#73; I &#135; &#197; Å
    &eacute; é &#74; J &#136; ˆ &#198; Æ
    &ecirc; ê &#75; K &#137; &#199; Ç
    &euml; ë &#76; L &#138; Š &#200; È
    &igrave; ì &#77; M &#139; &#201; É
    &iacute; í &#78; N &#140; Œ &#202; ?
    &icirc; î &#79; O &#141;  &#203; Ë
    &iuml; ï &#80; P &#142; Ž &#204; Ì
    &eth; ð &#81; Q &#143;  &#205; Í
    &ntilde; ñ &#82; R &#144;  &#206; Î
    &ograve; ò &#83; S &#145; &#207; Ï
    &oacute; ó &#84; T &#146; &#208; Ð
    &ocirc; ô &#85; U &#147; &#209; Ñ
    &otilde; õ &#86; V &#148; &#210; Ò
    &ouml; ö &#87; W &#149; &#211; Ó
    &oslash; ø &#88; X &#150; &#212; Ô
    &ugrave; ù &#89; Y &#151; &#213; Õ
    &uacute; ú &#90; Z &#152; ˜ &#214; Ö
    &ucirc; û &#91; [ &#153; &#215; ×
    &yacute; ý &#92; \ &#154; š &#216; Ø
    &thorn; þ &#93; ] &#155; &#217; Ù
    &yuml; ÿ &#94; ^ &#156; œ &#218; Ú

    Whilst the above list is by no means complete, it should contain the most useful characters and codes for you to build your sites using the special characters with ease.

    Article written by Lee

  • Building A Surfer Trap – Stage 4

    Date: 2011.02.21 | Category: Traffic | Response: 0

    Building A Surfer Trap – Stage 4.

    Here we go with stage 4 in our surfer trap.

    We should now have a pretty basic surfer trap set up with consoles on all of the FPA’s all of the links on all of the FPA’s (Excluding the FPA graphics) should go to either another FPA or, the a POTD Program.

    As mentioned in the last stage we are going to start building up some traffic to our surfer trap even though, we are not finished yet.

    The first place where you can get some good free traffic would be from a toplist counter.

    A good counter that I would recommend would be one of the following:

    Outster http://www.outster.com (A Gay Specific Counter)
    SexTracker http://www.sextracker.com (A General Adult Counter)

    You need to sign up to ONE of the above counters and only ONE.

    Usually a counter will ask you for some details when signing up for them these will usually include:

    Email Address.
    Site Url
    Name

    For the email address, enter a REAL email.
    For Your Name, Enter a name you wish to be known by to the counter owners.

    However, for the URL (The one to SEND traffic to FROM the counter) you should enter the index.html page of your surfer trap (The Multi-Site FPA).

    You will now be given some coding once you complete the counter sign up process. This counter code you now need to place on EVERY page of your surfer trap.

    Place the counter towards the bottom of your FPA’s (Including the Multi-Site FPA) this way, they will load after the rest of the graphics or at least, they should in theory.

    Basically what you are doing by implementing this counter is as follows:

    For each time the counter is displayed or clicked on your site (Depending on the counter you choose) you will earn one credit on the respective counters toplist.

    Each credit you earn on the toplist will move you higher up the list.

    Now, the higher up the list you get, the more visitors to the counter site that you are going to get visiting your surfer trap by clicking your link on the toplist.

    In return, by clicking on your surfer trap link from the toplist, they are ‘registering’ another impression of your counter hence, getting you one more ‘credit’ on the counter toplist hence, moving you higher in the listings.

    See where we are going with this?

    The more clicks you get from the counter to your hub, the higher you will get on the toplist in the process earning you more and more traffic to filter through your surfer trap.

    Adding these counter codes to your FPA’s as they stand at present should take you an hour or so to do so, for now this is where I will leave the traffic generation section of this tutorial.

    Article written by Lee

  • Converting French Traffic – The Niche Paysites That Work

    Date: 2011.02.21 | Category: Traffic | Response: 0

    In our last article we took a look at a three (3) month period of international traffic stats and, what niches worked on German adult traffic. In this article we will do the same again except we will be analyzing what niche paysites worked best on French porn surfers.

    French Traffic – Quick Analysis.

    It would seem that for many of the surfers we managed to grab and filter from France that their primary interest was in Teen and the Amateur niches although, that said, we did get a few conversion on some fetish paysites, specifically fetish sites that had ‘watersports’ and ‘BDSM’ featured on the paysites tour pages.

    French Adult Traffic – The Niches.

    As with the German traffic we targeted in the previous article we also filtered our French adult traffic to some niche specific hub sites as well as some general hub sites to better judge which niches converted the best on French surfers the results we experienced are as follows.

    Teen.

    Our conversions on French teen sites were not as good as what they were for German surfers however, that said, they were good non the less. With a ratio of around 1:192 over the three month period we analyzed the French adult surfers we managed to get to our sponsors sites worked well for us.

    Amateur.

    With our amateur conversions the one thing we noticed was that tours that featured teens as the main focus were the ones which converted consistently, with this in mind, we did change a couple of the Amateur tours we used to see how that would affect sales towards the end of the 3 month period and, sales did drop slightly, this would backup the statements in the Teen niche made above in that, French surfers are looking primarily for Teen orientated paysites.

    Asian.

    The two Asian niche paysites we used didn’t have many sales overall however, we did notice that the little traffic that we sent to them converted well, as above, Asian niche sites that featured teens were again the better converters on the French traffic we received.

    Ebony.

    I think it is worth mentioning the ebony niche, especially when you take into account we sent less than 100 hits to French ebony paysites and, managed to get 2 sales from those hits. Unfortunately, we did not anticipate the amount of traffic that wouldn’t choose the ebony niche so we have no solid figures that are worth mentioning here or, any explanation behind how we made the sales.

    Fetish.

    Our French fetish traffic seemed to like the more niche specific type of tours, making us sales on Watersports, BDSM and even general fetish paysites that said, the figures we achieved with the fetish pay sites we used were disappointing as we had thought this would be the ideal niche for the French markets.

    Gay.

    The sales we achieved with our gay French traffic were reasonable overall, the surfers chose to signup to gay sites that featured ‘twink’ like models on the tours again, this would lend favor to the fact that overall French surfers seem to be interested in the younger generation to get their kicks.

    French Traffic – The Results.

    Overall we were happy with the majority of the results we received on our French adult traffic with the exception of a few bad choices on our part trying to concentrate on the Fetish side of the industry. We certainly learnt that it would appear French adult surfers are looking for Teen orientated sites over the other niches.

    Article written by Lee

  • Thumbnail Preview TGPs And The Gay Market Place

    Date: 2011.02.24 | Category: TGP | Response: 0

    One of the latest crazes to hit the gay adult market from a webmasters point of view is that of the thumbnail preview TGP and, more surprisingly than this is the fact that this new breed of gay adult TGP seems to attract more traffic than the standard format TGP ever did so, what is a thumbnail preview TGP and just how do you go about making one of your own? This is what we will investigate in this article.

    Thumbnail Preview TGP Basics.

    A thumbnail preview TGP is just as the name suggests, a standard TGP with one main difference, the TGP itself doesn’t list gallery descriptions rather a small preview image of the content placed on each of the galleries submitted. This thumbnail preview is usually size between 100×100 pixels and 60×60 pixels in dimension however, the thumbnail preview size can be determined by the webmaster owning the TGP.

    How Do I Start My Own Thumbnail Preview TGP?

    In order to start your own thumbnail preview TGP you will need a couple of things, first and foremost, a domain name to run it on, the current trend in the gay marketplace is to name your TGP something short, memorable and, well, brand able so, the domain name you choose for your TGP should take all of these aspects into consideration. The next thing you will need in order to run your own gay thumbnail preview TGP will be the script which you use to manage the TGP itself, for this purpose I would highly recommend Autogallery MySQL from http://www.jmbsoft.com it is affordable and, easy to maintain which is a must if you are wanting to run a sizable TGP. One other thing that you may also like to consider investing in for your thumbnail preview TGP is a design, in fact, most of the ‘good’ thumbnail preview TGPs whether they are focused in the straight or gay market, have a clean, almost pay site quality design aspect to them. Of course, you do not need to keep up with the joneses however, if it works for other people, then why not see if it will work for you also?

    Thumbnail TGP Structure.

    So you now have a domain and have purchased the script and / or design that you want to use on your thumbnail preview TGP what next? Well first things are first, you should take a look at some of the other sites that currently exist and see how they do things, find out what things you feel they are doing wrong and, capitalize on that.

    You should also make some decisions now as to the look and feel you want your thumbnail preview TGP to have, how many galleries are you going to list on the front page each day? Will you be utilizing the archives feature of your TGP script? What limitations do you want to put on submissions from other webmasters? These are all aspects of running a TGP that you need to think of prior to opening your site up for general submissions.

    In general however, you will find that most thumbnail preview TGP sites will have roughly 100 thumbnail images on their front page of the site with any additional galleries being listed in their archives section again, you should decide on how you want to maintain your own site.

    Getting Traffic To Your Thumbnail Preview TGP.

    Now you have hopefully set your thumbnail preview TGP live you need to do one final step in making the TGP itself a huge success, get the traffic flowing, one of the best ways to do this, as with any other type of site is to ask your friends and associates to trade traffic with your site however, should this not be an option then you should use more conventional methods such as submitting galleries to other TGP sites ensuring that you use a recip to your TGP on each gallery as well as utilizing other forms of traffic such as cheap brokered traffic, top lists, web rings and, even counters, within a month or so you will soon start to see a steady flow of new webmaster gallery submissions and, with each new submission comes more traffic and ultimately, more income from your site.

    Article written by Lee

  • Building A Surfer Trap – Stage 5

    Date: 2011.02.21 | Category: Traffic | Response: 0

    So we hit stage 5 in this surfer trap tutorial.

    It was brought to my attention this morning that we never added any ALT tags to our single FPA link so, in a change to the planned tutorial I am going to touch on this stage as, once the search engines get to our surfer traps this is going to be a crucial aspect on how highly we get ranked.

    So what’s next?

    Ok, now what you have to do is go back to manually editing the FPA’s (All of them!)

    What you need to do is this…

    Take the Multi-Site FPA first then, on ALL of the links that lead to the single site FPA’s you need to add the ALT tag. Again, in the same way as we did originally however, instead of using this tag on the images we will use this on the actual TEXT of the link so, for example the link which may be:

    ‘Voyeur Porn’ leading to the FPA you have for the Voyeur niche in the HTML coding will already look like this:

    <a href=”mydomain.com”>Voyeur Porn</a>

    Will get turned into:

    <a href=”mydomain.com” ALT=”More Niche Related Keywords”>Voyeur Porn</a>

    The reason we are going back over these links now and not earlier on is because you should hopefully have started to get a small amount of traffic from your counter impressions. These counters are virtually ALWAYS being crawled by the search engines due to the amount of people linking to them so, by optimizing our site at this stage, it makes it less work in getting into the search engines.

    One other thing that we can now start to do (as we did a couple of stages back) is to create some more HTML pages with some tables on them, however, these will be HTML pages on their own with no images on them. Again however, you should make them 4 columns across and two rows high.

    What you want to add into these tables are NICHE links so for example, taking the TEEN niche we would make eight links like:

    Teen Sex
    College Girls
    Erotic Teens
    Teen Porn
    Etc
    Etc
    Etc
    Etc…

    You should do this for each of the MAIN niches so you would have a table for Teen, Gay, Mature, Asian, Ebony, Fetish and one for General and again, these should link to the NICHE FPA’s that you already have created.

    These tables will be used for another console on our surfer trap however, before we implement this console we are going to have some fun with them.

    Article written by Lee

  • Cleaning Up The Myths On Scrubbing

    Date: 2011.02.21 | Category: Billing Solutions | Response: 0

    Time and time again on message boards I see the same old topics regarding scrubbing usually preceded by some company being accused of scrubbing their webmasters surfers to much and the webmasters sales being lower because of the sponsor ‘scrubbing’ their surfers however, the reality of this is, it isn’t the sponsors who control how much or how little the surfers credit card transactions are ‘scrubbed’.

    The E-Commerce Dilemma.

    Irrespective of whether you are an online bookmaker, bakery or adult pay site owner the fact of the matter remains that only credit card fraud is on the increase and, in addition to the rise of online credit card fraud the methods in which the perpetrators of these crimes carry them out is also changing often combating the methods put in place by the online transaction processors to stop this happening luckily however, this is where ‘scrubbing’ comes into effect.

    So What Is Scrubbing?

    Scrubbing is a method used by the credit card processor that the companies who’s site you are sending a surfer to uses. Scrubbing is in effect, a method of calculating the probability that any single transaction (or group of transactions) could be fraudulent. That is to say, is being carried out by someone other than the true owner of the credit or debit card.

    Scrubbing is probably the single most useful tool provided to our sponsors by the credit card processors to ensure that every transaction that gets sent to them is credible and, once the transaction is allowed (or not) a part of the information contained with the transaction is sent to a central database to help other clients of that processor guard against receiving unlawful transaction purchases.

    How Does Scrubbing Affect Me?

    As a webmaster, believe it or not, scrubbing is actually a good thing for you. You know that each transaction processed is first of all a legitimate one and, secondly, you know that the sponsor who you are using is not going to go bankrupt due to excessive illegal transaction. This means that the sponsor can improve the services they offer YOU as a webmaster to assist you in making more money.

    In essence, the scrubbing of credit card transactions at a sponsors level increases the amount of money you make long term not only with that individual sponsor but, with every other sponsors who uses the same transaction processor.

    Article written by Lee.

  • Mirroring Adult Sites – Stage One.

    Date: 2011.02.23 | Category: Promotion, Tutorials | Response: 0

    In this next series of tutorials I will be exploring the benefits of utilizing your existing content to build more sites in the least amount of time possible, in fact, after you have completed the steps in this tutorial series you should be able to build over 20 types of site within 5 minutes using a single set of 50 pictures.

    So, onto the start of our tutorial.

    Stage one in this tutorial is something we have ALL done before, so what you need to do is this…

    Build a 50 pic free site, this is using a lot more content than a ‘standard’ free site however, what we are actually going to be making is a set of AVS sites and several TGP galleries, along with some SE pages and also some links list mirrored pages using this set of 50 images by building just ONE site! Sounds impossible? It isn’t… read on….

    Your site should have the following on it:

    1) Warning Page (index.html)
    2) Menu Page (menu.html)
    3) Gallery Pages (5 galleries of ten pictures called gallery1.html, gallery2.html etc)
    4) HTML Large image pages x 50 (picpage1.html, picpage2.html, etc.)
    5) Multi Site FPA (fpa.html)

    Now lets break these individual pages down into sets of instructions for each:

    Warning Page.

    This should have your standard warning text placed on it, along with an enter AND an exit link. The ‘enter’ link should link to your Multi Site FPA and the ‘exit’ link should go to a program such as the ARS Discreet Browser tour page.

    Menu Page.

    This should be a page containing an odd sized banner, links to your 5 gallery pages, plus text links at the bottom of the page ideally, these text links should be in the same style as the niche tables we created for the surfer trap except they should only contain 4 cells instead of 8. These links should go to a different ‘niche’ as the one you are building your current site for and, link to the existing FPA’s of your surfer trap.

    Gallery Pages.

    On your gallery pages, ALL of the thumbnails should be linked to the relevant HTML page with a text link at the top and at the bottom of the HTML page (No Banners are to be used on the gallery pages!) Also, the file names of the images should be pic1.jpg, pic2.jpg, etc for the full sized images and, thumb1.jpg, thumb2.jpg etc for the thumb nailed images. your images MUST be named this way!!

    Multi Site FPA.

    This should link to the individual FPA’s that you should already have on your server if you followed the surfer trap tutorial series (If you did not create this surfer trap the tutorials can be found at this link) as well as linking to the Single Site FPA’s this should also have a ‘no thank you’ link which goes to your Menu Page.

    Images.

    You need to have 50 images, you also need to have 50 thumbnails for the content you will be using on this site. I usually select my content by the niche I am building for, rename the images using The Rename then, once renamed I use Thumbnailer from Smaller Animal to create the thumbnails for each of the renamed images. This will give you 50 full sized pictures with 50 thumbnails named respectively for the larger image.

    They are the basics, now onto the good stuff…

    Once you have created these pages you need to create some folders on your Hard Drive which will be the SAME structure you will have on your server. This folder structure should look somewhat like this once you have saved each of the pages we have just created into their respective sub folders:

    FreeSite/index.html
    FreeSite/AVS/
    FreeSite/FPA/fpa.html
    FreeSite/Galleries/gallery1.html, gallery2.html, gallery3.html, etc, etc.
    FreeSite/Images/pic1.jpg, etc.
    FreeSite/Images/Thumbs/thumb1.jpg, etc.
    FreeSite/LinkList/
    FreeSite/Menu/menu.html
    FreeSite/PicPage/picpage1.html, picpage2.html, etc.
    FreeSite/Recips/
    FreeSite/Engine/
    FreeSite/TGP/

    This will give you 5 folders with HTML pages in them, one folder with the full sized images, one with thumbnails in it and five empty folders.

    At this point we will end the first stage in this tutorial as this should take you a couple of hours to complete.

    Article written by Le

  • Source Code – Eliminating HTML Margins

    Date: 2011.02.24 | Category: WebDesign | Response: 0

    Since the inception of the very first HTML document, margins existed that surrounded the document, like in the case with this document.

    The margins are there to act as a cushion between the edges of the browser and the contents of the page, so it’s easier to read the content.

    As good as margins are, wouldn’t it be nice to be able to eliminate them in some cases, where the design of the page calls for their termination? While most webmasters think it is not possible to “flush out” the default margins of a HTML document, it actually is, although only possible in IE 3+, and NS 4+. In this tutorial, I’ll show you how.

    Eliminating The Document Margin In IE 3+

    To get rid of the document margin in IE 3 and above, so content presses right against the edges of the browser, use the IE exclusive “leftmargin” and “topmargin” attributes:

    <body leftmargin=”0″ topmargin=”0″>

    It’s as simple as that!

    Eliminating The Document Margin In NS 4+

    To get rid of the document margin in NS 4 and above, use the NS 4 exclusive “marginwidth” and “marginheight” attributes instead:

    <body marginwidth=”0″ marginheight=”0″>

    Putting It All Together.

    By putting the two techniques together, we can create a document that flushes out its’ margins in both IE 3+ and NS 4+:

    <body leftmargin=”0″ topmargin=”0″ marginwidth=”0″ marginheight=”0″>

    Try out the above coding on your page, and you’ll see what I mean.

    Article written by Lee

  • Cascading Style Sheet Basics

    Date: 2011.02.21 | Category: WebDesign | Response: 0

    CSS (Cascading Style Sheets) have been around for a while now, and act as a complement to plain old HTML files.

    Style sheets allow a developer to separate HTML code from formatting rules and styles. It seems like many HTML beginners’ under-estimate the power and flexibility of the style sheet. In this article, I’m going to describe what cascading style sheets are, their benefits, and two ways to implement them.

    Cascading What’s?

    They’re what chalk is to cheese, what ice-cream is to Jell-O they complement HTML and allow us to define the style (look and feel) for our entire site in just one file!

    They get their name from the fact that each different style declaration can be “cascaded” under the one above it, forming a parent-child relationship between the styles.

    They were quickly standardized, and both Internet Explorer and Netscape built their latest browser releases to match the CSS standard (or, to match it as closely as they could).

    So, you’re still wondering what a style sheet is? A style sheet is a free-flowing document that can either be referenced by, or included into a HTML document (Kind of like using SSI to call a file but not, if that makes sense). Style sheets use blocks of formatted code to define styles for existing HTML elements, or new styles, called ‘classes’.

    Style sheets can be used to change the height of some text, to change the background color of a page, to set the default border color of a table the list goes on and on. Put simply though, style sheets are used to set the formatting, color scheme and style of an HTML page.

    Style sheets should really be used instead of the standard , < b >, < i > and < u > tags because:

    One style sheet can be referenced from many pages, meaning that each file is kept to a minimum size and only requires only extra line to load the external style sheet file

    If you ever need to change any part of your sites look/feel, it can be done quickly and only needs to be done in one place: the style sheet and furthermore, it is done globally.

    With cascading style sheets, there are many page attributes that simply cannot be set without them: individual tags can have different background colors, borders, indents, shadows, etc.

    Style sheets can either be inline (included as part of a HTML document), or, referenced externally (Contained in a separate file and referenced from the HTML document). Inline style sheets are contained wholly within a HTML document and will only change the look and layout of that HTML file.

    Open your favorite text editor and enter the following code. Save the file as styles.html and open it in your browser:

    Cascading Style Sheet Example.

    h1
    {
    color: #636594;
    font-family: Verdana;
    size: 18pt;
    }

    This is one big H1 tag!

    When you fire up your browser, you should see the text “This is one big H1 tag!” in a large, blue Verdana font face.

    Let’s step through the style code step by step. Firstly, we have a pretty standard HTML header. The page starts with the tag followed by the tag. Next, we use a standard tag to set the title of the page we are working with.

    Notice, though, that before the tag is closed, we have our tag, its contents, and then the closing tag.

    h1
    {
    color: #636594;
    font-family: Verdana;
    size: 18pt;
    }

    When you add the style sheet code inline (as part of the HTML document), it must be bound by and tags respectively. Our example is working with the tag. We are changing three attributes of the ’s style: the text color (color), the font that any tags on the page will be displayed in (font-family), and lastly, the size of the font (size).

    The code between the { and } are known as the attributes. Our sample code has three. Try changing the hexadecimal value of the color attribute to #A00808 and then save and refresh the page. You should see the same text, just colored red instead of blue.

    An Example Of An External Style Sheet.

    External style sheets are similar to internal style sheets, however, they are stripped of the and tags, and need to be referenced from another HTML file to be used.

    Create a new file called “whatever.css” and enter the following code into it:

    h1
    {
    color: #a00808;
    font-family: Verdana;
    size: 18pt
    }

    Next, create a HTML file and name it test.html. Enter the following code into test.html:

    External Style Sheet Reference Example.

    This is one big H1 tag!

    As mentioned above, you can see that the actual code in whatever.css is exactly the same as it was in the inline example. In our HTML file, we simply place a tag in the section of our page. The rel=”stylesheet” attribute tells the browser that the link to the external file is a style sheet. The type=”text/css” attribute tells the browser that whatever.css is a text file containing CSS (cascading style sheet) declarations. Lastly, the href=”whatever.css” attribute tells the browser that the actual file we want to load is whatever.css.

    Conclusion.

    Well, there you have it, a quick look at style sheets and how to implement both an inline and external version. Checkout the links below if you’ve never worked with cascading style sheets before. You will be surprised at some of the things you can do with them!

    Article written by Lee.

Premium Sponsors















Categories

Site Links