Ved Prakash Understanding the core markup - Writing Codes | codinggiri GuidePedia

0
Hello all ! In this post we will understand the structure module of webpages.Please note that while creating web pages (or should i say beautifull web pages ) developers follow the three main modules

  1. Structure  [HTML]
  2. Styling  [CSS]
  3. Behaviour [JavaScript]
I know it's kind of confusing if it is new to it but don't get confused [at least have a little faith in me man ]
we will start from the Structure Module the HTML and i am not going to write that what HTML can do and all blah blah blah stuff lets just jump start to coding.

open your notepad++ and choose from language >> H >> HTML.
 and start typing your code

<!doctype html>

<html>
 <head>
  <title>
  This is my first webpage
  </title>
 </head>
 <body>
  <p>
   Hello Coder Baba
  </p>
 </body>
</html>

save that file as .html and open that file in a browser like Mozilla Firefox or Google chrome.
open it and  you will see something like that.


Cheers ! You've created your very own web page with HTML.
now let us understand what does that code means. Since HTML is the language of tags and in HTML5 There are more than 400 tags. keep that in mind that

This is the opening tag ----- <tag>
and this is the closing tag ------ </tag>

Did you get the difference ? yes to close a tag just simply type a '/'.

and yeas there are some tag without closing, like <img>,<br><hr>. You don't have to put a closing tag for that.

And now let us understand a very basic and Important RULE while writing HTML.
The RULE is "Close the current tag before opening a new tag ".
For example you've open a tag <head> and after <head> you want to start <title> tag but remember before opening <title> you have to close the <head> with this </head>.

You must follow that rule because as you keep learning the HTML you'll write more complex code as shown in that picture below and you'll get stuck many time if you forget to close the tags properly.



In Next Post we will understand the tags deeply Thank you for reading Keep coding :)

Post a Comment

 
Top