Pages

Basic Tags



DocType
DocType declaration at the top of HTML document specifies the type of document and this document type declaration is required in XML documents. But in HTML it is optional. It is not a HTML element.
Syntax for doctype declaration in HTML 5 is <!doctype html>
Basic Tags of HTML
<html></html> HTML documents must start with <html> tag and must end with </html> tag.

<head></head> Used to provide a title for the document, define java script and CSS required for the page and meta data of the page.

<title></title> Used to Define a title for the page that will be displayed in titlebar of the browser while accessing the page. It must be inside the <head> element.

<script></script> Used to define java script functions required for the page.

<noscript></noscript>
The <noscript> tag is used to provide an alternate content for users that have disabled scripts in their browser or have a browser that doesn’t support client-side scripting. The <noscript> element can contain all the elements that you can find inside the < body> element of a normal HTML page. The content inside the <noscript> element will only be displayed if scripts are not supported, or are disabled in the user’s browser.

<style></style> Used to define CSS styles required for the page. It must be inside the <head> element.

<link></link> The <link> tag defines the relationship between a document and an external resource. The <link> tag is most used to link to style sheets. The <link> element is an empty element, it contains attributes only. This element goes only in the head section, but it can appear any number of times.

<meta></meta> Used to provide meta data information of the page like author name, description, keywords and refresh the page at specified interval. It must be within the <head> element and it has the following syntax.

The following statement provides author name of the page

<meta name=”author” content=”Naresh”/>
The following statement provides description of the page
<meta name=”description” content=”This Is Tutorial4us Home Page”/>
The following statement provides keywords for the page that will be used by search engines to find your page
<meta name=”keywords” content=”Tutorial ,C, C++, Java, Html, CSS”/>
The following statement makes the page refresh for every 30 seconds
<meta http-equiv=”refresh” content=”30”/>

<body></body> Used to specify the actual content to display on the page



No comments:

Post a Comment

 

Most Reading