Introduction to HTML5

HTML is a standard language for developing and creating interactive websites, introduced by Tim Berners Lee.

Tim Berners Lee.

HTML documents are created in any text editor for and can be run(executed) on any computer that has a web browser. HTML is compatible with most of the web browsers. HTML stands for Hyper-Text Markup Language.

Basic structure :- HTML tags are keywords enclosed within angular brackets, that define how your web browser must format and display the content. Tags are not case sensitive. Every HTML page is enclosed within two tags and . This page is divided into two sections internally, head section and body section. Head section contains title of the document which is enclosed within of and . The actual text of the document is written within and .

An attribute :- An attribute defines a property for an element, consists of an attribute/value, and appears within the element's start tag. Sometime we need additional information with a tag.

Structure of web page using HTML5 : 

Introduction to HTML5


<header> - Defines a header for a document or a section. 
<nav> - Defines a container for navigation links. 
<section> - Defines a section in a document. 
<article> - Defines an independent self-contained article. 
<aside> - Defines content apart from the content (like a sidebar). 
<footer> - Defines a footer for a document or a section. 
<details>- Defines additional details.

There are two types of tags:-
1. Container Tags:- Container Tags are also called paired tags. Container Tags have a beginning tag and an end tag. The end tag is similar to the beginning tag but with a ''/'' in front of it.
Example:- <body> </body> ; <head> </head>

2. Empty Tags:- Empty tags are standalone tags and do not have an end tag. <br> is an example of singular tag/Empty tag.

Purpose of tags:- 

1. <html> and </html> :- This tag indicates that the document is an html file.

2. <head> and </head> :-  It includes <Title> within it, the text within <head> is not displayed on the webpage. This is used for search engine optimization.

3. <title> and </title>:- The content within this tag is displayed on the title bar.

4. <body> and </body>:- This tag includes all content which is to be developed in the web browser. Most of the tags are included in this tag.


Sample Code is given below you can copy and paste it in our online code runner.


#ENJOY CODING





 

Post a Comment

FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP

Previous Post Next Post