Web Design & Development (Lecture_10)
Web Design & Development (Lecture_10)
Development
Lecture #10
• Whenever you want to collect information
from visitors you will need a form, which
lives inside a <form> element.
• Information from a form is sent in
name/value pairs.
Strict XHTML
Versions Transitional XHTML
of html
HTML 4
HTML 5
Doctype
Because there have been several
versions of HTML, each web page
should begin with a DOCTYPE
declaration to tell a browser
which version of HTML the page is
using (although browsers usually
display the page even if it is not
included).
Comments in html < ! -- -- >
If you want to add a comment to your code that will not be visible in
the user's browser, you can add the text between these characters:
It is a good idea to add comments to your code because, no matter
how familiar you are with the page at the time of writing it, when you
come back to it later (or if someone else needs to look at the code),
comments will make it much easier to understand.
In a Block
For Example
You might create a <div>
element to contain all of the
elements for the header of your
site (the logo and the
navigation), or you might create
a <div> element to contain
comments from visitors.
Div is also a Block element
Inline elements
Some elements will always
appear to continue on the same
line as their neighboring
elements. These are known as
inline elements.
• Example: <a>, <b>, <i>, <img>
Span
The <span> element acts
like an inline equivalent of
the element.
<iframe>
An iframe is like a little window
that has been cut into your
page — and in that window you
can see another page. The term
iframe is an abbreviation of
inline frame.
Example – Adding Google
Maps link in your Website
<Meta>
The element lives inside
the element and contains
information about that
web page.
Reserved
Characters
There are some characters that are used
in and reserved by HTML code. (For
example, the left and right angled
brackets.)
Reserved
Characters
WMA - Lecture # 13
<Video>
The <video> element has a number of attributes
which allow you to control video playback.
Video Attributes
Poster: This attribute allows you to
specify an image to show while the Src: This attribute defines the path
video is downloading or until the of the video
user tells the video to play.
Autoplay: When used, this attribute Loop: When used, this attribute
specifies that the file should play indicates that the video should start
automatically. playing again once it has ended.
<Audio>
HTML5 introduced the element
to include audio files in your
pages. As with HTML5 video,
browsers expect different
formats for the audio.
Example