Basic tags of HTML – geeksforjobs | 2021

 

Hey all, Welcome to Geeksforjobs

The <html> element :

The html element starts an HTML document.It contains everything an HTML document should contain except the <!doctype> element.

Attribute :

It is used for the enhancement of web page.

Example:

<html lang=”eng”> Here, text is an attribute. Attribute basically stands for additional properties which can be used for the enhancement of web page.

Attributes of the <html> element

  • class
  • dir
  • id
  • lang
  • version
  • xmlns

The <head> element :

The <head> element contains general information about the HTML document ,such as title ,meta tags and base address for URL.

Meta tags

Meta tags purpose is to include metadata (data about data) about your web page.

Metadata is passed as name/value pairs like this: Name=”Description” , Value =”My website” Various types of metatags attributes are :

  • <meta name=”Keywords” content =”html,css”
  • <meta name=”author” content=”geeksforjobs”>
  • <meta name=”viewport” content=”width=device-width” initial-scale=1.0″>
  • <meta http-equiv =”refresh” content=”5”>

Base tag

The HTML <base> tag is used to specify a base URL, for relative links.

For example

If you want to display images from this website http://www.starcharismatic.com/image multiple times on your webpage, then every time you have to write this lengthy path whereas we can reduce the task by using <base> tag.

<base> tag acts as a base URL or a directory of paths.

Attributes of head element :

  • class
  • dir
  • id
  • lang
  • profile
  • style
  • title

The <title> element

The title contains the title of the HTML document, which appears in the title bar of the web page. It appears on the title bar of web browser and is used by the search engine to refer the document.

Attributes of <title >

The <body> element

The body element contains the body of the html document. The complete content that appears on the web browser is feeded inside the body tag.

Attributes of body tag

  • alink
  • background
  • bgcolor
  • bgproperties
  • bottommargin
  • class
  • language
  • lang
  • leftmargin
  • rightmargin
  • scroll
  • style
  • vlink

Leave a Comment

Your email address will not be published. Required fields are marked *