html Basic_Tags

<!DOCTYPE>                                           Define the Document type

Definition and Usage:

The <!DOCTYPE> declaration must be the very first thing in your HTML document, before the <html> tag.
The <!DOCTYPE> declaration is not an HTML tag; it is an instruction to the web browser about what version of HTML the page is written in.
Always add the <!DOCTYPE> declaration to your HTML documents, so that the browser knows what type of document to expect.

<html>                                                                   Define an html document

Definition and Usage:

The <html> tag tells the browser that this is an HTML document.
The <html> tag represents the root of an HTML document.
The <html> tag is the container for all other HTML elements (except for the <!DOCTYPE> tag).

<head>                                            Define information about the document

The <head> element is a container for all the head elements.
The <head> element can include a title for the document, scripts, styles, meta information, and more.
The following elements can go inside the <head> element:
Definition and Usage
  • <title> (this element is required in an HTML document)

<title>                                               Define a title of document
Definition and Usage:

The <title> tag is required in all HTML documents and it defines the title of the document.
The <title> element:
  • defines a title in the browser toolbar
  • provides a title for the page when it is added to favorites
  • displays a title for the page in search-engine results
<body>                                           Define the document's body
Definition and Usage:
The <body> tag defines the document's body.
The <body> element contains all the contents of an HTML document, such as text, hyperlinks, images, tables, lists, etc.
<h1> to <h6>                                 Define html headings
Definition and Usage
The <h1> to <h6> tags are used to define HTML headings.
<h1> defines the most important heading. <h6> defines the least important heading.

<p>                                                        paragraph

Definition and Usage:
The <p> tag defines a paragraph.
Browsers automatically add some space (margin) before and after each <p> element. The margins can be modified with CSS (with the margin properties).

<br>                                                    insert a single line break

Definition and Usage:
The <br> tag inserts a single line break.
The <br> tag is an empty tag which means that it has no end tag

<!--...-->                                        comment


Definition and Usage:
The comment tag is used to insert comments in the source code. Comments are not displayed in the browsers.
You can use comments to explain your code, which can help you when you edit the source code at a later date. This is especially useful if you have a lot of code.

Comments

Popular Posts