ankitweblogic logo
W e b t u t o r i a l s

Directory Structure

DOCTYPE Declaration

Audio and Videos tag

YouTube Videos

Elements Removed

Semantic Elements

HTML5 Basic Structure

HTML5 New Elements

Create Element

Browser Support

HTML5 Form Element

Elements Removed in HTML5

The following HTML4 elements have been removed from HTML5.

Element Use instead
paragraph alignment CSS
<basefont>CSS
<big>CSS
<small>CSS
<center>CSS
<font>CSS
<frame> -
<frameset> -
<noframes> -
<strike>CSS

Example: basefont
Specify a default text color, font size, font face for all the text on the page.
<head> <basefont color="red" size="5" face="Comic Sans MS"> </head>

Example: big and small
big tag make the text size as 4, and small tag make the text size as 2. Default text size is 3.
<p> <big> Bigger text than Normal </big> </p>
<p> <small> Smaller text than Normal </small> </p>

Example: Base Hyperlink
If the hyperlink url is invalid or unable to open then it automatically redirect into a url specifed in base hyperlink
<head> <base href="http://www.AnkitWebLogic.com/" target="_blank"> </head>

Usefull HTML/HTML5 Tips

1. Mixing of uppercase and lowercase for element name is bad, lower is recommended
2. Close All HTML Elements
3. Close All Empty HTML Elements
4. Use Lower Case Attribute Names
5. Spaces around equal signs is legal, But space-less is easier to read
6. Make the title as meaningful as possible
7. To ensure proper interpretation, and correct search engine indexing, both the language and the character encoding should be defined as early as possible in a document
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>HTML5 Syntax and Coding Style </title>
</head>
8. Place the opening bracket on the same line as the selector.
9. Use one space before the opening bracket.
10. Use 2 spaces of indentation.
11. Use colon plus one space between each property and its value.
12. Use space after each comma or semicolon.
13. Use semicolon after each property-value pair, including the last.
14. Only use quotes around values if the value contains spaces.
15. Place the closing bracket on a new line, without leading spaces.
16. Use Lower Case File Names
17. There is no difference between the .htm and .html extensions.
18. When a URL does not specify a filename (like http://www.ankitweblogic.com/html5/), the server returns a default filename like index.html, index.htm, default.html, and default.htm.
19. If your server is configured only with "index.html" as default filename, your file must be named "index.html", not "index.htm."