Â
HTML is a standard language for
developing and creating interactive
websites, introduced by 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 :Â
<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