Documente Academic
Documente Profesional
Documente Cultură
Hypertext
Tags & elements
Text formatting
Lists, hyperlinks, images
Tables, frames
Form
Banyaktoolspendukungpengembanganweb,
contoh:MicrosoftFrontPage,NetscapeComposer,
Adobe PageMill,MacromediaDreamWeaver,
HotDog dll
HotDog,dll
MengapaperlumempelajaricodeHTMLdasar?
Oleh:FiftinNoviyanto,S.T.,M.Cs.
hypertext referstothefactthatWebpagesaremorethanjusttext
cancontainmultimedia,providelinksforjumpingwithin&without
markup referstothefactthatitworksbyaugmentingtextwithspecialsymbols(tags)
thatidentifystructureandcontenttype
h id if
d
HTML 2.0 (IETF, 1994): tried to standardize these & other features, but late
in 1994-96, Netscape & IE added many new, divergent features
pages
HTMLmerupakansekumpulantagyang
mengidentifikasikanstructuredancontent
tagsareenclosedin< >
<img
img src
src="image.gif"
image.gif /
/> specifiesanimage
mosttagscomeinpairs,markingabeginningand
ending
HTMLelementadalahpasangantag
HTMLmemiliki2elemenutama
HEADcontainssetupinformationforthebrowser&theWebpage
e.g.,thetitleforthebrowserwindow,styledefinitions,JavaScriptcode,
BODYcontainstheactualcontenttobedisplayedintheWebpage
<html>
<! Matakuliah Pemrograman Web -->
<! Chapter # 2 -->
<head>
<title>Title for Page</title>
</head>
<body>
Text that appears in the page
</body>
</head>
</html>
22/03/2011
<html>
<head>
<title>Text Layout</title>
</head>
<body>
<p>
This is a paragraph of text<br/>
made up of two lines.
lines
</p>
<p>
This is another paragraph with a
GAP between
some of the words.
</p>
Beberapabagiandikelolaolehbrowser
Untuksetiapurutanspasimenunjukkan
saturuang
Browsersecaraotomatismenyesuaikan
ukuranwindow
Canoverridesometextlayout
<br/> taguntukmembuatbarisbaru
(tanpapenutuptag)
<p></p> Taguntukmembuatparagraf
baru
Taguntukmembuatspasi
kosong
Digunakanuntukmembuatheading:judulmaupunsubjudul
canspecifyheadingsfor
<html>
<head>
<title>Blocks of Text</title>
</head>
paragraphsorblocksoftext
<h1></h1> tagsproducealarge,
<h2></h2> tagsproduceaslightly
d li h l
<h2>Subheading</h2>
<p> Here is some subtext.</p>
smallerheading
<h6></h6> tagsproduceatiny
heading
caninsertahorizontalruleto
<hr/>
dividesections
<p>
This paragraph is<br/>
indented on the first line<br/>
but not on subsequent lines.
</p>
</body>
</html>
boldheading
<body>
<h1>Major heading 1</h1>
<p> Here is some text.</p>
<hr/> drawslineacrosswindow
setswidth
setsthickness
</html>
canspecifyhow
elementsshouldbe
aligned(defaultis
leftjustified)
<html>
<head>
<title>Text Alignment</title>
</head>
<body>
<h1 style="text-align:center">Centered
Heading</h1>
<p>
< >
Here is some left-justified text
(which is the default in HTML).
</p>
utilizeSTYLE
attributeoftag
tojustifymorethan
<p style="text-align:center">
Here is some centered text.
</p>
oneelementasa
group,useDIVtags
<div style="text-align:right">
<h2>Right-justified Heading</h2>
<p>Here is some right-justified text.</p>
</div>
</body>
ellelements
enclosedinDIVare
formattedsimilarly
canspecifystylesforfonts
<html>
<head>
<title>Text Styles</title>
</head>
<big> </big>
<body>
<p>
Text can be emphasized using
<b>bold</b>, <i>italics</i>, or even
<big>resizing</big>. <br/>
The typewriter font is good for
displaying code:
<tt>sum = sum + i;</tt> <br />
And remember: <span style="color:red">
<small>2<sup>10</sup></small> =
1024</span>
</p>
</body>
like(fixedwidth)font
thefont
h f
sizeofthefont
</html>
increasethesizeof
<small> </small>
<sub> </sub>
<sup> </sup>
decreasethe
specifyasubscript
asuperscript
<p style="color:red"></p>
paragraphs
for
<span style="color:blue">
</span> forinlinetext
Note:ifelementsarenested,theorderof
opening/closingisimportant!(LIFO)
</html>
<html>
<head>
<title>More Text Grouping</title>
</head>
<body>
<p>
<tt><pre>
for (i = 0; i < 10; i++) {
sum = sum + i;
}
</pre></tt>
</p>
<p>
Eagleson's Law states that:
<blockquote>
looked at for six or more months
might as well have been written by
someone else.
</blockquote>
</p>
</body>
</html>
<pre></pre> specifytextthatistobe
displayedasis(linebreaksandspacing
arepreserved)
usefulforcodeorwheneveryouwant
f
p f
y
texttofitaspecificlayout
<blockquote></blockquote>
specifytextthatistobeindentedonboth
margins
usefulforquotationsorforindentingtext
insubsections
<html>
<head>
<title>Simple Lists</title>
</head>
Thereare3differenttypesoflistelements
<ol></ol> specifiesanorderedlist
<body>
<p>
<ol>
<li>First thing.
<li>Second thing.
<li>Third thing.
</ol>
</p>
<p>
<dl>
<dt>HTML
<dd>HyperText Markup Language
<dt>HTTP
<dd>HyperText Transfer Protocol
</dl>
</p>
</body>
</html>
(usingnumbersorletterstolabeleach
listitem)
<li>
<li> identifieseachlistitem
cansettypeofordering,startindex
<ul></ul> specifiesunorderedlist
(usingabulletforeach)
<li> identifieseachlistitem
<dl></dl> specifiesadefinitionlist
<dt> identifieseachterm
<dd> identifiesitsdefinition
22/03/2011
Spring,2004,WebProgramming
Wendywillard(2006). HTML. ISBN 9790072263787.
Davidwillard(2005). CrashCourse. ISBN 0071422420.
Andi(2001). DesainWebdenganMicrosoftFrontPage97.
W h
WahanaKomputer&Andi
K
&A diYogyakarta.
k
ISBN 9795335219.
Shellywoods(2001). IntroductoryConceptsandTechniques.
Gexpublisingservice. ISBN 978142927206.
StevenE.Callihan(2006). HTML4inaWeekend.
USA. ISBN 1592000592.
Buatlahhalamanwebsederhana
Gambarsketsawebyangakandibuat
GunakansebanyakmungkintagHTML