Step 2: Create with me the sexiest website from scratch- your own!

Home page erstellen, website erstellen. Welches HTML, das Box Modell, Unterschied zwischen id und class. Semantik. Tutorial in Deutsch und English. This day we write the right doc type. Learn something about the box model. The difference between id and class and semantic as necessary.

Miss Website shows the structure
 Website with border.
Your own website is always the beauty!

Artikel in Deutsch . This day we tell the browser which doc type he had to use. We learn the difference between id and class and the necessarity of semantic.

You need

  1. a texteditor.
  2. Your folder and your index.html (link to the 1.article is at the bottom)

Remember the folder structure.

desktop folder main folder: name it:sexy-website.
»» desktop folder1.folder: images
»» desktop folder2.folder: css.

html commands the browser.

There are more than one “Hyper Text Mark up Languages” so we have to use the correct doc type, otherwise the browser can’t show our work correct. ;) .

4. Your website /home page get the doc type

Open your index.html and type in the text below. Copy and paste may work too.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"  lang="de" xml:lang="de">

Doc Type command the browser which html you are using.

find out the structure of your website

Please read and see this screenshot: Sexiest Website mit Struktur.

There is a top-middle-bottom column with black border. Conten colum with blue border and sidebar column in magenta with three little boxes in green.

definition of a div

A div is a blocklevel element. It forces line breaks and it can group other html tags.

What is an ID or class?

You can asign most of the html tags with an id or class. This id or class is the feeder of stylesheet arguments.

Difference between id or class

ID identify a specific element and therefore must be unique on the page.

Classes mark elements as members of a group and can be used multiple time.

ID is unique

class is for multiple use

Semantic html means using html tags for their implied meaning.

If an id is unique than the only way is to assign top-middle-bottom with an id. All other html tags become a class.
You can name id and class as you like but it makes sense to use logical names. ;)

use meaningful names

Meaningful names are : top-middle-bottom.

5. The first divs for your website /home page

Please tipp in.

<!--top end-->

This is an html comment. It is unvisible but very helpfully.

<body>
  <div id="top">
 
          <h1>Headline</h1>
 
     </div><!--top end-->
  <div id="middle">
    <div class="middle-inner">
         <p> Hi,I am yours. </p>
      </div>
   </div><!--middle end-->
 
<div id="bottom">
 
     <p>footer</p>
 
</div><!--bottom end-->

Safe. Open in your browser and you’ll see—- nothing more than a big headline and the textline. ;)

There are no attributes.

6.The first Style.css for your website /home page

A Cascading StyleSheet is a simple text file. Open your texteditor safe the empty file under style.css in the folder “css”.
You can use more than one Cascading Style Sheet. I using three. One for the screen:style.css. One for print:print.css and one for pda.

So it makes sense to order this files in a subfolder.

7. link to the style.css

Between head and /head we command our websites. So we have to link the style.css between this html tag.

<link rel="stylesheet" type="text/css"  media="screen"  href="css/style.css" />

The meanings:

  1. Link is a referer.
  2. rel =relationship .
  3. Data is a text file.
  4. for which media: screen.
  5. referer to this style is .. href…..

Box Modell

margin describes the distance between html tags.

padding describes the inner distance of a html tag.
Border –you know what it means ;)

Your picture is 200px width. You would like to have a nice border around, you would have a distance to the next text around and another background color.

200px + the border width + margin + padding = (ie) 240px for the div around.

Most of the browser do this calculation – IE doesn’t. ;)

The picture below shows *my box model*. Try to find your way to visualize the box model for you.

Box Model ala mts ;)
 Box Model ala mts

2. Use a correct doc type. Difference between id and class. See the strucuture of your layout. Link correct to the style.css. Learn the box model.

Next time: How to use color, background color and background images. The difference between headlines and how tu use them in a semantic correct way.

Read on…

I love feedback-comments and social bookmarks
War es hilfreich, freu ich mich über ein +1 oder Twittern

Top

5Kommentare zu : Step 2: Create with me the sexiest website from scratch- your own!

5 Kommentare
  1. 1

    ich bin mit step 2 sehr gut zurecht gekommen, auch das box-modell-bild hat mir sofort klar werden lassen, wie sich die 3 bezeichnungen zueinander in beziehung stehen.

    nun wäre noch toll zu wissen, ob link sich auf den inhalt der link-klammern bezieht oder auf den nachfolgenden inhalt, weil der tatsächliche verweis (link) ist ja eigentlich mit href beschrieben.

    außerdem interessiert mich, wofür “h” bei schriftgröße steht. hight?
    oh und medien gibt es neben screen noch? ist die bezeichnung beliebig oder muss es immer “screen” heißen? kann ich auch “bildschirm” schreiben?
    wären die anderen: print, handy, pda oder ist auch das willkürlich wählbar?

  2. Autor mts von WebDesign-in.de mts
    2

    Hi toonfish,
    das *link* steht da, weil es irgendwelche Leute, die diese Vorgaben machten, dies so bestimmt haben,
    man kann dabei keine deutschen Worte verwenden, screen muss screen heißen, darf nicht Bildschirm heißen, auch die anderen wie print etc sind nicht willkürlich wählbar.

    h bei Schriftgröße habe ich nirgendwo stehen, ich habe wo

    <h1>Titel</h1>

    stehen, darum versteh ich die Frage nicht

    Schriftgröße gibt man mit height an

    es werden da immer englische Worte genommen, die Browser müßten sonst weltweit andere Sprachen ständig übersetzen, ;) selbst die Japaner, Chinesen schreiben da englisch

    lg

  3. 3

    Moin mts,
    wann schreibste die weiteren steps oder habe ich die >2 nur übersehen?

    mfg
    Nogge

  4. 4

    Hmm. Du weißt aber schon, dass Du völlig legitim und valide durchaus mit hunderten IDs pro Seite arbeiten kannst? Diese IDs müssen nur dokumentweit eindeutig sein, d.h. Du darfst eine bestimmte id nicht zweimal vergeben, z.b. id=”main-menu”. Kein Problem ist aber auf der gleichen Seiten noch ein Element mit der id=”sub-menu” oder id=”footer” zu haben.

  5. Autor mts von WebDesign-in.de mts
    5

    Hi Frank, ja das weiß ich aber id main-menu und id sub-menu sind ja 2 ids aber EINE ID darf es nur einmal geben ;)

    danke fürs Klarstellen

    lg

WebDesign Angebot

mein Angebot

Ich biete benutzerfreundliches, barrierefreies WebDesign und InternetMarketing, denn was nützt die schönste Homepage, wenn sie keiner findet. Schalk und Support ist inclusive.
Kontakten Sie mich einfach » E-Mail

InternetMarketing Angebot

Mieten Sie meine Kreativität

Ich habe jede Menge Idee und Können, wie man auch ihren Shop, ihre Homepage und ihr Business im Internet bekannt macht.
Kontakten Sie mich einfach » E-Mail

WebDesign Preise

Preise by mts

Professionelles WebDesign ist eine Investition. Billig und günstig sind andere ..ich bin gut und bezahlbar.
Kontakten Sie mich einfach » E-Mail


Achtung: Sie haben JavaScripts und/oder CSS deaktiviert. Sie können diese Inhalte nutzen, einiges an Funktionen steht jedoch nicht zur Verfügung.

Zu den Inhalten springen

« zurück

vor »

  • WebDesign Icon

    WebDesign

    WebDesign ist mehr als Grafik- und Printdesign. WebDesign und Website Marketing sind Geschwister. Rund um WebDesign.
  • WebDesign Tutorials Icon

    WebDesign Tutorial

    Kein WebDesigner fällt vom Himmel. Mal ein Online Shop, mal Community, mal Web 2.0 social Media oder Wiki. Erfahrungen uvm.
  • CSS Icon

    CSS

    Ich habe zig CSS Beispiele, Erkenntnisse irgendwo auf der Festplatte meines PCs und Gehirns. Ich gebe diese gern weiter :-).
  • InternetMarkering Icon

    InternetMarketing

    Wie verkauft man im WWW unter Ausnutzung der SUMAs, der Social Media Dienste. Internet Marketing Praxis uvm..
    und Website Promotion
  • SEO Icon

    SEO

    SEO ist weder Geheimwissen noch 0815 Tätigkeit, - schlicht notwendig für den Erfolg im WWW. Meine Erfahrung mit SEO.
  • Internet Recht Icon

    Internet Recht

    Was tun bei Abmahnungen. Rechtsfallen sind u.a. free Download, Fotos, Marken, Forum, Kommentare. Wo gibt es Hilfe.
  • Schokolade Icon

    ..und außerdem ...

    barrierefreies WebDesign | Usability im WebDesign

©  2004 - 2012Professional Webdesign barrierefrei auf WebDesign-in.de, ImpressumImpressum Lizenz||Top