6 HTML CSS Tutorial – HTML declarations

6 HTML CSS Tutorial – HTML declarations

The HTML declaration (<!DOCTYPE>) will be the first thing you write on your html document before anything else. This is how the browser knows the version of HTML to expect.

 

All other HTML versions have a Document Type Definition (DTD) except for HTML5 . The DTD defines the accepted document structure, accepted elements and attributes in a HTML document.

 

Join the FULL HTML and CSS Tutorial Here >>

 

There are different versions of HTML. There are still older web pages out there. However when you write your new web page code it will be something like the following:

<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<p> I am the body</p>
</body>
</html><span id="mce_marker" data-mce-type="bookmark" data-mce-fragment="1">​</span>

 

 

The <!DOCTYPE > Declarations

 

HTML5 declaration

<!DOCTYPE html>

 

HTML 4.01 Strict

<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01//EN” “http://www.w3.org/TR/html4/strict.dtd”>

 

HTML 4.01 Transitional

 

<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd”>

HTML 4.01 Frameset

<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Frameset//EN” “http://www.w3.org/TR/html4/frameset.dtd”>

 

XHTML 1.0 Strict

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>

 

XHTML 1.0 Transitional

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>

 

XHTML 1.0 Frameset

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Frameset//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd”>

 

XHTML 1.1

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.1//EN” “http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd”>

 

 

 

HTML elements examples

Head section

<head>

<title>The Page Title</title>

</head>

 

HTML Headings:

<h1>Heading level 1</h1>
<h2>Heading level 2</h2>
<h3>Heading level 3</h3>
<h4>Heading level 4</h4>
<h5>Heading level 5</h5>
<h6>Heading level 6</h6>

 

Paragraphs:

<p>Paragraph One</p> <p>Paragraph Two.</p>

 

HTML Comments:

<!– This is a comment –>

 

Links

<a href="https://bizanosa.com/"> Go to Bizanosa Now!</a>

Images

<img src=”myimage.jpg” >

 

Form

<form action="http://bizanosa.com">
First name:<br>
<input type="text" name="firstname" value=" ">
<br>
Last name:<br>
<input type="text" name="lastname" value=" ">
<br>
Choose One:<br>
<select name="Courses">
<option value="select">Select One</option>
<option value="html">HTML</option>
<option value="css">CSS</option>
<option value="js">JS</option>
<option value="wordpress">WordPress</option>
</select>
<br> <br>
<input type="submit" value="Submit">
</form>

 

 

Table

<table>
<tr>
<th>Student</th>
<th>Rank</th>
<th>Country</th>
</tr>
<tr>
<td>Peter Gluck</td>
<td>2</td>
<td>Germany</td>
</tr>
<tr>
<td>Jisa Mendoza</td>
<td>1</td>
<td>Mexico</td>
</tr>
<tr>
<td>Vaugan Schlutz</td>
<td>3</td>
<td>Austria</td>
</tr>
<tr>
<td>Brian Held</td>
<td>5</td>
<td>UK</td>
</tr>
<tr>
<td>Mark Wan</td>
<td>4</td>
<td>Canada</td>
</tr>
<tr>
<td>Aldo Lucini</td>
<td>6</td>
<td>Italy</td>
</tr>
</table>

 

>> To join this full HTML and CSS tutorial use the link below:

Join the FULL HTML and CSS Tutorial Here >>

 

 

The following two tabs change content below.
Just a geek who loves Trance . Be yourself everywhere you go. And Be yourself in everything you do. Cheers !

Latest posts by Ricky Wahowa (see all)

Comment Here