Skip to main content

HTML Tutorial - Elements


ELEMENTS

HTML documents are text files made up of HTML elements.
HTML elements are defined using HTML tags.

HTML TAGS

  1. HTML tags are used to mark-up HTML elements
  2. HTML tags are surrounded by the two characters < and >
  3. The surrounding characters are called angle brackets
  4. HTML tags normally come in pairs like <b> and </b>
  5. The first tag in a pair is the start tag, the second tag is the end tag
  6. The text between the start and end tags is the element content
  7. HTML tags are not case sensitive, <b> means the same as <B>
HTML Tag has two types.such as :
     1. Element or container Tag code is <head>.......</head>
     2. Empty Tag code is
     <br/> ; <hr/> ; <img src="/../mypic.jpg"/>; <input type="text" size="12"/>..... Input Field


HTML ELEMENTS

Remember the HTML example from the previous page:
Code:
<html>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>

See the description Tag Code: 
<b>This text is bold</b>

The HTML element starts with a start tag: <b>
The content of the HTML element is: This text is bold
The HTML element ends with an end tag: </b>
The purpose of the <b> tag is to define an HTML element that should be displayed as bold.
This is also an HTML element:

<body>    This is my first homepage.   
<b>This text is bold</b>    
</body>

This HTML element starts with the start tag <body>, and ends with the end tag </body>.
The purpose of the <body> tag is to define the HTML element that contains the body of the HTML document.

WHY DO WE USE LOWERCASE TAGS?

We have just said that HTML tags are not case sensitive: <B> means the same as <b>. If you surf the Web, you will notice that plenty of web sites use uppercase HTML tags in their source code. We always use lowercase tags. Why?
If you want to follow the latest web standards, you should always use lowercase tags. The World Wide Web Consortium (W3C) recommends lowercase tags in their HTML 4 recommendation, and XHTML (the next generation HTML) demands lowercase tags.





Comments

Popular posts from this blog

C Program01 Chap01: Area of Squre

/*Prime.Chapter_01/17 Write a program for Area of Squre*/   //document #include<stdio.h>    //Header file #include<conio.h>   //Header file Preprocessor Directive #define N 10        //Symbolic constant     void main()     //main program starts {     int area;       //variable declaration     area = N*N;     //process stmt      printf("Area of square:\n"); // o/p stmt     printf("%d", area);            // to show the output visible     getch();     return 0; }   // Program ends.

Create a Stopwatch of using Visual Basic2010

Create a Stopwatch  - Visual Basic  2010 Part-01 This tutorial will show you how to make a stopwatch: Click on Project next to Create: Click on Windows Form Application, and name the project "Your name's Stopwatch" and then click Ok.                                            You can change the form text to "your name's stopwatch". Click on the form and then go to properties window, then change the text property. You also need to disable the maximize control of the form. That's because you don't want the user to maximize the stop watch. Go to the properties window, and change the maximize box property to False:                                                  ...

Program_function_02

Adding two Integer number using Function. /* Adding two Integer number using Function.*/  #include <stdio.h> int sum( int x, int y); /* function prototype */ int sub( int x, int y); int mul( int x, int y); int div( int x, int y);  /* function main begins program execution */  void main( )  {     sum (5,7);     sub (10,5);     mul (10,5);     div (10,5);  } /* end main */ /* Function maximum definition */ /* x, y and z are parameters */ int sum( int x, int y) {     printf ("%d", x+y);     getch(); } /* end function maximum */ int sub( int x, int y) {     printf ("%d", x-y);     getch(); } int mul( int x, int y) {     printf ("%d", x*y);     getch(); } int div( int x, int y) {     printf (...