6 HTML CSS Tutorial – HTML declarations

Last updated on October 31st, 2020 at 06:21 am.

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.

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="https://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:

Comment Here

We use cookies on Bizanosa.com. Continuing to use this website, implies consent of our Privacy Policy Privacy Policy

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close