HTML - SYNTAX Page-2

HTML - SYNTAX

HTML BASICS TO ADVANCE TUTORIALS

HTML - SYNTAX

Here we will learn what are the new things in HTML.
<!DOCTYPE html>
This is the first line of code in HTML and it is not case sensitive. We will learn what is case sensitive later.

Character Encoding

In HTML Character Encoding will be like
<meta charset="UTF-8">
All are case insensitive.

Attributes

Attributes have a name and a value. We can use attributes as globally or specifically for a single element global attributes can use on any element in the body. Syntax for attribute is as follows.
<body id="something">
Here ' id ' is attribute and ' something ' is value of the attribute.

Tags

Some new tags are introduced in HTML for design a better structure. They are like
  • header

  • footer

  • aside

  • article

  • section

  • nav

  • dialog

  • figure

In previous versions of html we need to specify type in script and link as follows

<script type="text/javascript" src="file.js"></script>

In HTML we use it as

<script src="file.js"></script>