Beruflich Dokumente
Kultur Dokumente
Hyper Text
+
Markup Language
Markup Language
A markup language is a
set of markup tags.
The purpose of the tags
are to describe page content.
HTML Elements
Anatomy of an Element
<tag>Content</tag>
An HTML element includes both
the HTML tag and everything between
the tag (the content).
Anatomy of an Element
<tag>Content</tag>
The element tag gives the
content structure and meaning.
Anatomy of an Element
<tag>Content</tag>
Tags normally come in pairs. The
first tag is the start tag, and the second
tag is the end tag.
Anatomy of an Element
<h1>Main Headline</h1>
HTML has a defined set of tag
names (also called keywords) that
the browser understands.
Anatomy of an Element
<html lang=en></html>
Most elements can have attributes,
which provides additional informatin
about the element.
Anatomy of an Element
<div class=left-nav></div>
Attributes always follow the same
format: name=value. You can use
either single or double quotes.
doctype
html
head
body
<!DOCTYPE html>
<html></html>
The <html> element de!nes
the whole HTML document.
<html lang=en></html>
The <html> element should have a lang
attribute to tell the browser what language
your page is written in.
<head></head>
The <head> contains special elements
that instruct the browser where to !nd
stylesheets & javascript !les, as well as
provide meta data about your site.
<body></body>
The <body> element contains
the document content (what is shown
inside the browser window).
Nesting
The use of our !rst three tags (html, head and body),
introduces and important concept: Nesting, which is when
tags wrap other tags. When you create markup, you should
indicate nesting by indenting the nested tags with 2 spaces
(preferred) or a tab.
title
base
meta
link
script
style
<title></title>
The title element:
defines a title in the browser toolbar,
provides a title for the page when it is
added to favorites
displays a title for the page in search
engine results.
EXAMPLE
<title>My Portfolio</title>
<meta>
The <meta> tag provides metadata
about the HTML document. Metadata
will not be displayed on the page, but
will be machine readable.
EXAMPLE
<meta charset="utf-8">
The <meta> is a single tag
it does not require a closing tag.
Tags: Paragraphs
<p></p>
The <p> element is a block-level tag
that contains default space-before and
space-after properties (making indention
unnecessary.)
EXAMPLE
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin non placerat tortor. Quisque
imperdiet vel enim vitae tempor. Pellentesque nec finibus turpis, at placerat purus. </p>
<p>Nam turpis metus, tristique at mi ac, cursus luctus est. Curabitur ac dapibus tellus. Etiam
consectetur sagittis nisi eget rhoncus. Nam maximus diam sed turpis pretium pharetra.</p>
Output
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Proin non placerat tortor. Quisque imperdiet vel enim
vitae tempor. Pellentesque nec finibus turpis, at placerat
purus.
Nam turpis metus, tristique at mi ac, cursus luctus est.
Curabitur ac dapibus tellus. Etiam consectetur sagittis
nisi eget rhoncus. Nam maximus diam sed turpis pretium
pharetra.
Tags: Headings
<h1></h1>
through
<h6></h6>
The header elements are block-level
tags that give you the ability to assign
semantic weight (importance) to your
headlines.
EXAMPLE
<h1>Hello World !!</h1>
<h2>Hello World !!</h2>
<h3>Hello World !!</h3>
<h4>Hello World !!</h4>
<h5>Hello World !!</h5>
<h6>Hello World !!</h6>
Hello World !!
Hello World !!
Hello World !!
Hello World !!
Hello World !!
Hello World !!
Tags: Lists
<ul>
<ol>
<li>
Note
List tags are always used in nested pairs.
The wrapping tags de!ne the list type,
and indicate where the list series begins
and ends.
<ul>
<li></li>
</ul>
The <ul> (unordered list) element is a
block-level tag that wraps a series of <li>
(list item) elements. The default property
for the list items is a bullet.
EXAMPLE
<ul>
<li>Ahmed</li>
<li>Eats</li>
<li>A Lot</li>
<li>Of</li>
<li>Food</li>
</ul>
Ahmed
Eats
A Lot
Of
Food
<ol>
<li></li>
</ol>
The <ol> (ordered list) element is a
block-level tag that wraps a series of <li>
(list item) elements. The default property
for the list items is decimal (1, 2, 3).
EXAMPLE
<ol>
<li>Ahmed</li>
<li>Eats</li>
<li>A Lot</li>
<li>Of</li>
<li>Food</li>
</ol>
1.Ahmed
2.Eats
3.A Lot
4.Of
5.Food
Tags: Formatting
(partial list)
small
b (or) strong
sub
sup
del
big
q
blockquote
cite
i (or) em
EXAMPLE
<br>
The <br> element is a single, inline
tag that works anywhere in the body
to create a single line break. In a <p>
element.
EXAMPLE
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin
non placerat tortor.<br><br> Quisque imperdiet vel enim vitae
tempor. Pellentesque nec finibus turpis, at placerat purus. </p>
Output
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Proin non placerat tortor.
Quisque imperdiet vel enim
vitae tempor. Pellentesque nec finibus turpis, at placerat
purus.
<hr>
&
&
“
“
&
&
–
—
©
←
→
Tags: Images
<img>
Note
The <img> tag is empty;
it requires a src (source) attribute to
pull in the image into the page. It does
not require an alt tag, but if the image
is essential to the content (e.g. not a
background or decorative element), it
should have one.
EXAMPLE
<img src="images/logo.gif" alt=Acme Corp>
<a></a>
EXAMPLE
<a href="aboutme.html">About Me</a>
<a href="http://www.colum.edu">My school</a>
<a> tags are always used in pairs,
wrapping the content you want to activate
as a link. If you use an absolute URL, it
must start with http://.