Sunday, October 26, 2014

Basic Syntax and Document Stucture of HTML

I will share about basic syntax and document structure of HTML. You have to know about this post before you make a HTML document. i hope you will get my point. Happy reading ^^ ...

Basic Syntax:

- HTML elements are defined using HTML tags.
- HTML tags are surrounded by the two characters < and > , called angle brackets.
- HTML tags normally come in pairs like <i> and </i>.
- The first tag in a pair is the start tag, the second tag is the end tag.
- The text between the start and end tags is the element content.
- HTML tags are not case sensitive, <i> means the same as <I>.
- This is an HTML element. example <i> This text is italic</i>.
- Tags can have attributes : 

  1. Attributes can provide additional information about the HTML elements on your page, 
  2. Example, <body bgcolor="pink"> 
  3. Attributes always come in name/values pairs like this: name="value"  
  4. Quotes style "pink" or 'pink'
- Comment form <!--............-->
- Browsers ignore comments unrecognizable tags,line breaks, multiple spaces, and tabs 


HTML DOCUMENT STRUCTURE
<html>
<head>
<title> Title of page </title>
</head>
<body> This is my first homepage <i> This text is italic</i></body>
</html>
  1. The whole document must have <html> as its root.
  2. A document consists of a head and a body of frameset.
  3. The <title> tag is used to give the document a title which is normally displayed in the browser's window title bar (at the top of the display).

0 comments:

Post a Comment