HTML – Tags

HTML Tags:

  • HTML language providing elements to prepare web pages
  • We represent HTML elements with angular brackets (<>) called HTML Tags.
  • HTML Tags are 2 types
    • Non empty tags (container tags)
    • Empty tags

Paired Tags (Non empty tags): Contains data. It is a combination of start tag & end tag

Syntax:
                        <start> data </end>
Example:
                        <title> data </title>

Unpaired Tags (Empty tags): It contains only start tag and we must end in the same tag

Syntax:
            <start/>
Example:
            <br/>
            <img src=” “/>
            <input type=”text” />

Note: HTML is errorless language – hence it accepts the tags without syntax such as <br>

Writing first HTML program:

  • <doctype> tag represents which version of HTML is using in the document by which browser will understand and execute the code.
  • HTML document starts with HTML tag and end with HTML tag
<!DOCTYPE html>
<html>
      …
      …
      …
</html>
  • Every HTML program has two locations
    • Head location
    • Body location

Head Location:

  • The information which is not visible on web page.
  • <meta> information: By which Search engine recognize our web site.
  • CSS code
  • JavaScript code
  • Links to other documents(files)

Body location: The information visible on webpage

  • Headings
  • Paragraphs
  • Form tags
  • Images
  • Hyperlinks….

Example HTML Program:

<!doctype html>
<html>
            <head>
                        <title>My First Web page</title>
                        <meta name=”Keywords” content=”HTML, CSS, JavaScript tutorial”>
                        <meta name=”Description” content=”Web Technologies tutorial site”>
                        <link type=”text/css” rel=”stylesheet” href=”/styling.css”>
            </head>
            <body>
                        <p>I am planning to develop tutorials website</p>
            </body>
</html>
Scroll to Top