HTML and CSS Reference
In-Depth Information
A graphical overview of the HTML markup syntax shown so far is presented here:
Tag
Name
Attribute
Name
Attribute
Value
<h1 class=“primary”>Example Heading</h1>
Attribute
End
Tag
Affected Content
Start Tag
HTML Element
Hello HTML and XHTML World
Given these basics of HTML syntax, it is best now to look at an example document to see its
application. Our first complete example written in strict HTML 4 is shown here:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title> Hello HTML 4 World </title>
<!-- Simple hello world in HTML 4.01 strict example -->
</head>
<body>
<h1> Welcome to the World of HTML </h1>
<hr>
<p> HTML <em> really </em> isn't so hard! </p>
<p> Soon you will &hearts; using HTML. </p>
<p> You can put lots of text here if you want.
We could go on and on with fake text for you
to read, but let's get back to the topic. </p>
</body>
</html>
O NLINE http://htmlref.com/ch1/html4helloworld.html
A simple modification of the initial <!DOCTYPE> line is really all that is necessary to
make this an HTML5 example, the comment and text is changed so you can keep the
examples straight:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title> Hello HTML5 World </title>
<!-- Simple hello world in HTML5 example -->
</head>
<body>
<h1> Welcome to the Future World of HTML5 < / h1>
<hr>
<p> HTML5 <em> really </em> isn't so hard! </p>
 
Search WWH ::




Custom Search