HTML and CSS Reference
In-Depth Information
CREATING WITH TAGS: AN OVERVIEW
Most of the content on the Internet is created with HyperText Markup Language (HTML).
You may be surprised to learn that several applications you use every day — for example, your
word processor — also were created with markup languages. However, like all computer
languages, with HTML, all you see is the content, not the underlying language. h e language
works like the frame of a building — you know it's there underneath all that paint and
drywall, but you can't see it. In this topic, I make the language of HTML very visible and show
you how to use it to build your own structures.
If you're familiar with previous versions of HTML and XHTML, you'll be able to transfer the
bulk of your knowledge to HTML5. And if you're brand-new to working with HTML, you'll
i nd HTML5 quite simple. Essentially, all you have to do is place your content between an
opening tag and a closing tag, called a container, and the container will style your text or
display your graphics and media on the Web page. Figure 1-1 illustrates containers:
Element name
Opening tag
Container = between
opening and closing tags.
The <p> tag is inside the
<body> container and
'Hello' is inside the <p>
container.
8
Closing tag
Figure 1-1: Containers in HTML5.
For example, the following line,
< h1 > This is big text. </ h1 >
tells the interpreter in your browser to create big text that looks like this:
h is is big text.
h e text inside the arrow brackets < > is the code. In this case, h1 is the code for big text.
h e arrow brackets tell where to begin the container ( <h1> ) and where to end the container
( </h1> ). Everything inside the container is coni gured to the size and style of the tag, which
is either built into the tag or created using CSS3.
While we're getting started here, you can have a little fun creating and viewing some HTML5
with little examples. All you have to do is type any of the code provided in this chapter in a
text editor such as Notepad if you're running Windows or TextEdit if you're on a Mac. Save
the i le with the extension .html , and then open it in an HTML5 browser. To open a Web
 
Search WWH ::




Custom Search