| :: code war·ri·or | ||||||||||
|
|
|
|
| home :: html tutorials :: site building :: q&a :: resources :: shop |
|
Quick Essentials There are some snippets of information that you really need to know yet don't fit anywhere else. We strongly advise you read it, even if it doesn't seem relevant yet. Line Breaks The P tag can be used to create paragraphs, but what if you just want a line break? Use the BR tag, as in this example: <P>Using the BR tag<BR> Using the BR tag Note that you don't have to have a line break in your actual code - Most people do though so they can see what's going on. DOCTYPE Tag There's one tag that goes before the HTML tag at the top of your HTML document - the DOCTYPE tag. It's not strictly necessary, but including it tells your visitor (or their browser) about what version of HTML your using. Currently we're on version 4, but since we're not obeying all the strict rules of version 4, we call it transitional. Therefore just put this - you don't have to understand all the bits at this stage: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> None of this displays on your page, so just paste it in and forget about it. Comment Code You can add comments to your code to help you when you look at it later. Just tell the browser to ignore them, by surrounding them with <!-- and --> - for example: <!-- My Comment Here --> Special Characters Some characters are used by the HTML language and so can't be displayed on your page. For example, when the browser sees < it expects a tag. To use these characters, you need to put their codes. All character codes begin with an ampersand and end with a semi-colon. The most common characters and their codes are:
A full list of special characters is available here. Horizontal Rules If you want to rule a horizontal line across your page, you can use the HR tag: <HR SIZE="3" WIDTH="150"> The size attribute controls the thickness of the line. You can specify the width either in percentage terms or in pixels. To make the line a solid, add the noshade command to the tag: <HR SIZE="3" WIDTH="50%" NOSHADE> Some browsers will respond to a COLOR attribute (with a normal hex code) but this will not always work. If you want a coloured line, it would probably be safer to use an image. We will come onto images later so don't worry about them just yet. That's all the basics covered for now, so let's move onto links.
|
· code-warrior |
| home :: html tutorials :: site building :: q&a :: resources :: shop |
|
|
|
|
|
|