MYP5

HTML



Kontakt: palkovaj@yahoo.com
Dátum poslednej aktualizácie ... 15.novembra 2006

Valid HTML 4.0!

1. Code structure - <html>, <head>, <body>

<html>
  <head>
    <title> this is the title </title>
  </head>
  <body>

  this is the body of the document
  into this part you write most of the tags and the contents of your web site

  </body>
</html>


To set the coding of your web site (if you want to use also Slovak characters), use tag <meta> ; you may choose from two different types of coding the Slovak characters - windows-1250 and iso-8859-2 - both will do the same job and display your characters correctly. To use for example windows-1250, type into the head-part of the document:

<meta http-equiv="Content-Type" content="text/html; charset=windows-1250">

2. Cascade styles - introduction to formatting HTML

Cascade styles are a modern way of formatting web pages. They make working with design and graphics faster and transparent. In the beginning we will be writing the styles in between the <style> tags, which you write in the beginning of the web-page, usually between <head> and <\head>.

Let us try formatting the background color of our basic web-page. To do this we need to use an identifier body, after which there are composed brackets. Into these brackets we write the attributes of the identifier and how we wish to change them. Follow the example below:

<html>
  <head>
    <title> this is the title </title>
    <style type="text/css">
      body {background-color: blue;}
    </style>
  </head>

  <body>
    this is the body of the document
    into this part you write most of the tags and the contents of your web site
  </body>
</html>