Datasheet

20
An introduction to HTML
Adobe Dreamweaver CS4 Digital Classroom
1
Tag structure and attributes
HTML uses tags, or bracketed keywords, that you can use to place or format content. Many tags
require a closing tag, which is the keyword preceded by a forward slash (/).
1 Choose File > Open. When the Open dialog box appears, navigate to the dw01lessons
folder. Select BasicHTML.html and press Open.
2 Select the Split button ( ) in the Document toolbar to see the layout as well as the code
that makes up the page.
Take a look at line 10 (indicated at the left edge of the Code panel). The text My Bold
Title is inside a Strong tag, which is simply the word strong contained within angled
brackets. Any words or characters inside these tags are formatted in bold, and appear as
shown in the Design view.
A look at the code reveals the tags used to format text in your page.
Tags can also accept CSS rules that specify additional information for how the tag should
display the content. CSS rules can take a number of di erent values, such as a size, a
color, or a direction in which to align something. Take a look at the line that reads This
text will appear inside of its own paragraph. This line is enclosed in a p (paragraph) tag, which
separates it from the other text by a line above and below. You can add a class rule to this
to align the text in whichever direction you want.
3 Highlight the entire line that reads This text will appear inside of its own paragraph at the
bottom of the Design view.
4 With the CSS button selected in the Property Inspector, locate the paragraph align
buttons. Press the Align Center button (
).
DWCS4.indb 20DWCS4.indb 20 9/10/2008 3:24:19 PM9/10/2008 3:24:19 PM