Subscribe now! ( 1400 subscribers )

Building a poker template

Time has come to go through the list of features and write the code for them. The question which we should keep in mind here is “What content do I have?”.

Play poker button

Ok. We want a poker button. Some people prefer to use <input type="submit" /> for all kinds of buttons. Those buttons are made for submitting a form though, and that’s not what we want here. When you think of it, is this “Play button” any different from a link? I think not. We will make it look like a button with CSS later on. Let’s use the HTML of a simple link:

<a href="play-poker.html">Play poker</a>

Advertisement

All sites cost money to run and getting that money is often done with some kind of advertisement on the site. What kind of ads should we use for this template? Looking at the top10 it seems that images are more common than text so let’s use images. Don’t forget to let advertisers specify alternate text to their images so you don’t have to make something up for the alt attribute.


Advertisement

Advertisement: Play roulette online

Beginners guide

To get beginners to play on our site we need to at least teach them the basics. How? People don’t like manuals and they are often hard to navigate in. The best would be if no manual were needed at all, but let’s be realistic, some people will still need help. A good approach is to use questions in natural language to lure people to read the guide. Keep it simple and easy to read. To mark that this is the beginners guide we add a header with that name in. Don’t be tempted to use any other header than h2, the h1 will be used for the name of the site and this is a second level header, nothing else. To mark up the questions we use a paragraph of text with links. At the end we add a link to more information. The class “more” there is just a way to say that this paragraph is different from the one above.


Beginners guide

If you are a poker beginner you might want to start by reading the rules. When you are done with that you can register an account with us. Don't worry, to join is free of charge and you can even win some money in our monthly tournaments.

More questions are answered in the frequently asked questions section

News

People playing poker are probably interested in poker news too. By having news on your site your users don’t have to go somewhere else looking for them. This will be a separate section so we should add a header here too, h2 is appropriate. The news items themselves are just items in an unordered list, so let’s use the HTML for that,

    . End it all with a link to the news page that we wrap it in a classed paragraph like before.

    
    

    News

    We maintain an news archive too.

    Forum

    The forum posts can be handled much like the news. A header, a simple list, this time ordered by with the most active on top. End it with a now familiar classed paragraph.

    
    

    Forum

    Our forums are always filled with people to answer your questions.

    Search

    The bigger the site gets the more important it becomes to get a site search. A search clearly resembles a form; the user fills in a few values and sends them to the site. A simple textbox for the search query with a submit folloing it.

    Just in case you’re not familiar with the modern way to make a good form I’ll go through the elements used below briefly. A

    groups similar form elements together. For example, if you have two separate fields for first name and last name, you can signal that they are both part of the full name by adding a fieldset around both of them. Using we then tell what the meaning of the fieldset is. For the previous example we could use “Full name”. The last “new” tag here is the <label>. It simply shows that there are a relation between the text in front of the button and the input box right next to it. A good thing about this relation is that it enables you to click on the label and have the input selected; something that is particularly useful with small radio buttons. This is what the HTML looks like:</label>

    
    
    Site search

    About us

    Everyone wants to know who they’re dealing with before they make a purchase of some kind (I believe that’s one of the reasons some e-shops have problems, but that’s a completely different story). Anyways, it’s easy for you to put up an image and some quotes from people that are happy with your services, so do it. The header and “more” paragraph should be familiar by now.

    
    

    About us

    PokerCompany has been in the business since 1997 and is...

    Want to read more about us?

    On the next page we will take all the pieces of HTML and put them together. It’s getting interesting, don’t you think?

Similar articles

Friendly Bit is a blog by Emil Stenström, an interface developer and Web 2.0 promoter that blogs about the modern web and how to make best use of it.