Monday, April 6, 2015

HTML5 Tags - doctype , html , head ,title , body , heading ,paragraph


  • Chrome , Firefox ,Internet Explorer , Opera browsers support for HTML5.


<!DOCTYPE>

  • All the HTML5 document start with a type declaration.
  • Not a HTML tag.
  • Gives an instruction to the browser , what is the version of html page written in.
  • Common <!DOCTYPE> declaration in HTML5 is <!DOCTYPE html>

<html>

  • Used to declare the language. <html lang = "eng">
  • Tells browser it is a HTML document.
  • Represent the root of the HTML document. 
  • Contain all the elements in HTML except <!DOCTYPE>.

<head>

  • Contain information above the html document.
  • Element which can used inside the head section are as follow
    • <title>
    • <style>
    • <meta>
    • <base>
    • <link>
    • <script>
    • <noscript>
You can learn those tags in my following posts.
  • In HTML5 head element can omitted.




<title>

  • Required in all HTML documents.
    • Can't omit title tag.
    • If you omit document is not valid as HTML.
    • Can only have one <title> element in any HTML document.
  • Used to specified the title of the document.
  • Content in between start and end tags display on the browser tab.








<body>

  • Contains the main content of the html document which are display in the web page.
  • Element which can used inside the body section are as follow
    • <h1> - <h6>
    • <p>
    • <a>
    • <br>
    • <img> and etc.

You can learn those tags in my following posts.


<h1> to <h6>

  • Used to define only headings
  • <h1> used to define most important heading.
  • <h6> used to define least important heading.
  • Importance of headings is goes on  <h1> <h2> <h3> and so on.








  • You can't use <b> tag to bold headings

           <b> tag used to bold the text.You can learn this tag in my following posts.










<p>

  • Used to define paragraphs.
  • Result is depends on large or small screens , window size.
  • Any number of spaces and any number of new lines , count as only one space.









No comments:

Post a Comment