HTML Flashcards
Start and end a heading Level (1-6)
<h1> Heading Level1 </h1>
<h2> Heading Level2 </h2>
Start and end a heading Level (1-6)
<h1> Heading Level1 </h1>
<h2> Heading Level2 </h2>
Start and end a paragpraph
<p>This is a paragraph </p>
Complete simple Document
Mir first HTML Document
<p>Hello World!</p>
Hyperlinks
<a>Link Text</a>
Hyperlinks
<a>Link Text</a>
div, span
div: a block element with no special meansing
span: an inline-element with no special meaning
- both are usually used in combination with an id or class attribute
<div>
<h1>My <span>Important </span> Heading </h1>
</div>
div, span
div: a block element with no special meansing
span: an inline-element with no special meaning
- both are usually used in combination with an id or class attribute
<div>
<h1>My <span>Important </span> Heading </h1>
</div>
html
Root of the document structure (HTML4, HTML5)
meta
information about the document
link
connection to other documents, webpages, etc.
unordered List
<ul> <li>eins</li> <li>zwei</li> <li>drei</li> </ul>
Shown as bulletpoints:
- eins
- zwei
- drei
strong, bold, italic, marked, durchstrichener Text
strong: <strong></strong>
bold: <b></b>
italic: <i></i>
marked:
durchstreichen:
table mit zwei Zeilen und drei Spalten
a simple form
Folgende Zeile erstellt einen Knopf mit dem Namen send:
action attribute
where to send the form-data when a form is submitted
method attribute
HTTP method to use when sending form-data.
can contain POST or GET as value:
- GET: form data attached to URL
- POST: form data included in the body of the HTTP request
label
- the label contains an input element
- or the label and the input are linked via the for/id attribute
example:
Name:
Select
Select car:
Mercedes
Audi
BMW
Hier wird nun ein Dropdown box mit der Wahl Mercedes, Audi und BMW angezeigt. Am Anfang steht da Select car:
Button
Buttons werden immer folgendermassen erstellt:
Dabei bestimmt value, wie der Button heisst bzw. angezeigt werden soll.
z.B:
Sobald der Button "Klick mich" geklickt wird, kommt eine Meldung mit der Nachricht Hi da draussen!.
Newer form features
Horizontaler Strich
<hr></hr>
Bilder
<img></img>
src wird Name der Datei eingegeben. In alt steht der Text, welcher angezeigt werden soll, falls das Bild nicht angezeigt werden kann. Width bestimmt die Breite und Height die Länge des Bildes.