Saturday, December 15, 2018
Thursday, December 13, 2018
How to use HTML hr and br Tag?
The HTML <hr> tag is used to separate the content according to the subject. This tag generates a horizontal line that can be used to separate different topics. It is also called horizontal rule in HTML. In HTML5, the <hr> tag defines the thematic break and in old versions, it was used to create a horizontal rule.
Wednesday, December 12, 2018
Tuesday, December 11, 2018
Sunday, December 9, 2018
How to use HTML script & noscript Tag?
Introduction of HTML <script> Tag
<script> tag of HTML is used to define client side script in web pages. For example, through the <script> tag you can add JavaScript in the HTML document. JavaScript is a client-side scripting language. With the help of this, you can generate dynamic content and validate forms etc.
Friday, December 7, 2018
How to use DOCTYPE declaration in HTML?
HTML <! DOCTYPE>
This is not a tag in HTML. This is called document type declaration. As you can guess by its name, it provides information about the type of document. This information helps the interpreter to organize the webpage in a better way.
<!DOCTYPE> declaration provides information to interpreter about the HTML version which is used in an HTML document. Many browsers do not support old HTML versions so whenever you create an HTML document, <!DOCTYPE> declaration tells the interpreter what version of HTML you are using.
Whenever an HTML document is rendered in the form of a webpage, it is first checked by the validators whether the HTML document is valid or not. The different validator is used to validate every version of HTML.
<!DOCTYPE> declaration tells the validator that the HTML document is to match with which HTML version. If the validators can't validate the document, then you can't show the webpage.
Whenever you declare <!DOCTYPE> in an HTML document, it must be the first line of the HTML document.
Syntax of HTML <! DOCTYPE>
<!DOCTYPE> is declared differently in every version of HTML. These are being described below.
HTML 4.01 <! DOCTYPE> Declaration
In HTML version 4.01, <!DOCTYPE> is defined in three modes (Transitional, Frameset, and Strict). All elements of HTML are allowed in the Transitional mode, but frame-set is not allowed in this mode.
Frameset mode is also like transitional mode, but framesets are allowed in it.
In the Strict mode, all other elements except HTML are presentational elements and framesets are allowed.
XHTML 1.0 <! DOCTYPE> Declaration
Similar to HTML4, it is declared in XHTML <!DOCTYPE> three modes. These modes apply in XHTML only to those that are in HTML4 but their syntax is different. The syntax of all these modes is being given below.
Transitional
Frameset
Strict
<!DOCTYPE> in HTML5
In the HTML5, <!DOCTYPE> declaration has been made very easy and simple.
<! DOCTYPE html>
Hopefully, this "HTML Tutorial - <!DOCTYPE>” would be helpful for you. If it's so please help your friends and other bloggers to share this post on social media. If you have any question related to the post, please comment on the comment box and also follow this website for more information about the blogging and SEO tips.
Thursday, December 6, 2018
Wednesday, December 5, 2018
How to use Block and Inline Tags in HTML?
HTML Block and Inline Tags
Block Tags
HTML has two types of block level and inline tags. Whenever block level tags are shown on the webpage, a line of space is created before and after that automatically. Some common block level tags are div, p and h1 etc.
Inline Tags
The second types of tags are inline tags. When these tags are used, on the webpage these show up in the line of their previously used tags. If you do not use the <br/> tag then there is no space before and after it. Some inline tags are a span, anchor and img etc.
HTML <Div> Tag
The <div> tag is used to divide the page. This is also called a division tag. You can use other HTML tags in this tag. <div> is a block level tag. You can design your web page using this tag with CSS. This page divides the entire page into the section.
These sections can hide and show when you need it. By doing this, the information will be shown to the visitor, when he wants to see it. The CSS applies to all the tags inside of <div>.
The <div> tag can be used to separate different types of information from a webpage. An example of this is being given below.
The above script generates the given web page.
Some other block-level tags
<form>
<form> tag is a block level tag. With this tag, you can define the beginning and end of the form on a webpage. Other related tags from other HTML forms come within this tag.
<h1> ..... </ h6>
All heading tags are block level tags. Every heading defines a block of itself where it has an automatic line break before and after.
<p>
As you know paragraph is defined by <p> tag. This tag creates a break line before and after every paragraph. Therefore <p> tag is also known as block level tag.
<ol>, <ul>
Both list tags <ol> and <ul> are block- level tags because every list defines a section for itself.
<table>
The <table> tag is also considered a block level tag because it creates a separate section which is separate from the entire content of the page and includes line breaks before and after it.
<pre>
This is a block level tag. All other tags can be used in this tag and by using it, as you configure tags in the text editor, it will show up the same on the webpage.
HTML <span> Tag
<span> is an inline tag. It is used to format the text. Whenever you use this tag, your text remains in the same line instead of going to the second line.
Formatting applies only to the text that is between this tag. <span> tag does not have any attributes of itself, but you can use style and class attributes with this tag. You can also use this tag in the headings.
An example of this is being given below.
The above script generates the given web page.
Some Other Inline Tags
<a>
<a> tag is considered inline tag. You can link any text while using it. Doing so, it shows on that webpage in the same line.
<a>
<a> tag is considered inline tag. You can link any text while using it. Doing so, it shows on that webpage in the same line.
<b>
<b> tag bold the text without any line break. So this is also an inline tag.
<i>
<i> tag makes text italic and this is also an inline tag.
<u>
From the <u> tag, you underline the text. It is also considered inline tag.
<img>
From the <img> tag, you can insert the image between the texts. Doing so, it does not break any line in the text. Therefore <img> tag also has an inline tag.
<input>
With the <input> tag you can create other elements inside the form such as textbox and button etc. But if you do not use <br/> tag then there is no line break between these elements.
Hopefully, this "How to use Block and Inline Tags in HTML?” would be helpful for you. If it's so please help your friends and other bloggers to share this post on social media. If you have any question related to the post, please comment on the comment box and also follow this website for more information about the blogging and SEO tips.
Previous:- How to use List in HTML? Next:- How to use Form Tag in HTML?






