Hypertext Markup Language (HTML)
An Introduction |
Prof. David Bernstein
|
Computer Science Department |
bernstdh@jmu.edu |
<html>
and
</html>
tags<!DOCTYPE html>
declaration before the root element -- it provides
information to the browserbody
Elementbody
Element:
body
Element:
<body>
and
</body>
tagssection
Element:
h1
to h6
aside
Element:
header
and footer
Elements:
p
ol
and ul
represent
ordered lists and unordered lists, respectivelyli
represents an element of a listdl
represents a list of definitionsdt
represents the term being defineddd
represents the definitionfigure
Element:
figcaption
element
div
Element:
acronym
, cite
, code
,
em
, kbd
span
Element:
img
(which includes a src
attribute)video
(which includes autoplay
,
controls
, loop
, and src
attributes)audio
(which includes autoplay
,
controls
, loop
, and src
attributes)a
Element:
href
attribute that indicates
the destination URLtarget
attribute can be used to control
how the broswer displays the destination
(e.g., _blank
,
_self
, framename)head
:
title
:
link
:
rel
(the relationship),
href
(the reference), and type
(the content type of the other resource)stylesheet
(for formatting information) and alternate
(for
alternate versions of the document) meta
:
table
Element:
caption
elementthead
elementtbody
elementsthead
and tbody
Elements:
tr
elements (one for each row)tr
Elements:
td
elements (one for each column)form
- The outermost elementlabel
- A descriptioninput
- A "typed" data-entry mechanism
(sometimes called
a control)button
- A buttonselect
- A mechanism for selecting
(one or more options) from a
set of alternativestextarea
- Multiple lines of textinput
Elements:
type="checkbox"
)type="radio"
)type="text"
)input
Elements:
type="telephone"
)type="url"
)type="email"
)type="date"
)type="month"
)type="week"
)type="time"
)type="number"
)type="range"
)type="color"
)input
with a type
of
submit
that will cause a GET
or POST request to be sent to the servermethod
and action
properties in the form
element to specify
the details of the submitted request