HTML language have a pattern in which the content is edited. Everyone who codes in HTML language should follow the same principle provided by the HTML standards. HTML language consists of different sections in which each section is coded.
Here is a sample code written in HTML
The Declaration is not an HTML tag, it is just used to instruct the web browser about the version of HTML used to code the webpage.
in HTML 4.01, the declaration refers to DTD, because HTML 4.01 was based on SGML. The DTD is used to specify the rules for the markup language, so that the browser can render the contents correctly. In HTML5 it does not require a reference to a DTD because it is not based on SGML. Here are some of the common DOCTYPE Declaration of HTML
HTML5
The <html> tag is the root of an HTML document and is also the container for all other HTML elements except the declaration.
The following elements can go inside the head section :
The <body> tag contains all the contents of an HTML document, such as text, hyperlinks, images, tables, forms etc.
For example:
Here is a sample code written in HTML
<html> <head> Head of the document... </head> <body> Body of the document... </body> </html>
HTML Versions
Since the beginning of the web, there have been many versions of HTML, each one of them better than the previous with more functions and efficiency.- HTML - Released in 1991
- HTML+ - Released in 1993
- HTML 2.0 - Released in 1995
- HTML 3.2 - Released in 1997
- HTML 4.01 - Released in 1999
- XHTML 1.0 - Released in 2000
- HTML5 - Released in 2012
HTML Declaration
The Declaration is the first thing to be coded in your HTML page. It defined the document type of the HTML page that you are coding. It is also prompted to add the declaration to your HTML page, so that the browser can determine what type of document the webpage is.The Declaration is not an HTML tag, it is just used to instruct the web browser about the version of HTML used to code the webpage.
in HTML 4.01, the declaration refers to DTD, because HTML 4.01 was based on SGML. The DTD is used to specify the rules for the markup language, so that the browser can render the contents correctly. In HTML5 it does not require a reference to a DTD because it is not based on SGML. Here are some of the common DOCTYPE Declaration of HTML
HTML5
<!DOCTYPE html>HTML 4.01 Strict
"<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">HTML 4.01 Transitional
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">HTML 4.01 Frameset
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
HTML <html> Tag
The <html> tag is used to describe the webpage. It is used to tell the browser that this is an HTML document.The <html> tag is the root of an HTML document and is also the container for all other HTML elements except the declaration.
HTML <head> Tag
The <head> element is used to include the header files of the webpage. It is a container for all head elements.The following elements can go inside the head section :
- <title>
- <style>
- <base>
- <link>
- <meta>
- <script>
- <noscript>
HTML <body> tag
The <body> tag is used to define the document's body. It is used to describe the visible webpage contents coded using HTML language.The <body> tag contains all the contents of an HTML document, such as text, hyperlinks, images, tables, forms etc.
HTML Comments
Comments are used to place details and information about HTML elements. comments are not displayed by the browser but is visible in the source code. Comments are used using the comment tag <!-- and -->. Note that an exclamation mark (!) is written in the starting but not in the ending.For example:
<!--This is a comment-->
0 comments:
Post a Comment