HTML Overview - Day 1

HTML Overview - Day 1

we have all heard the name HTML in our life whether we belong to computer science or not. But few are aware of what is HTML. Let's figure out together what is HTML.

In layman's language, HTML is a language of browsers. This tells the browser how to structure a web page for user. In technical words, you can say that it is a hypertext markup language which consists of lot of tags or elements to provide structure to the content that users are seeing. It is not case-sensitive. but the best practice is to use lowercase.

Structure of HTML element - It consists of four parts.

1) opening tag - it is enclosed in the angular bracket which tells from here its effect starts.

2) content - on which this tag effect is shown.

3) closing tag - it is enclosed in the angular bracket with /. At this point, the tag effect vanishes.

4) attribute - it is optional. you can add this element to provide extra things to it. Ex - style in <p> tag. but we are not using it in the below example as it is optional.

EX - <p> we are learning HTML </p>.

Output

Types of Element

Nested Element - A nested element means one element can have other elements.

EX - Code Snippet of HTML

output

Block and inline element -

Block element means that element takes while line. in another word, if we use a new element it will start from the next line. on another hand, inline elements take space the same as content. that means the new element start from the same line as the previous element.

void element -

when the element doesn't have a closing tag then is called as a void element.

ex - <img> tag

Boilerplate of HTML code

it contains doctype, html, head, body tags.

1) Doctype - it tells the type of document and set of rules what that page has to follow.

2) HTML - it contains all other tags of the page. it is also known as the root element.

3) head - it contains metadata information or CSS information.

4) body - it contains actual data which is visible to users.

These are the basic components and Structure of an HTML. In the next Blog, we will learn more about its elements.