Categories
HTML

Basic of Html

It is a markup language which defines the structure of its content HTML is not a programming language.  HTML consists of a collection of elements to enclose, or cover, different sections of the material to expose it to some degree or to function in a certain manner. The enclosure tags can connect a word or picture to another location, can Bold words, make the font larger or shorter, and so on.  if we want some sentence to stand by itself then we have to write it into between the enclosed paragraph tag for example

we are going to learn HTML basics

What is HTML Tag? 

HTML tag help the browser to recognize the HTML document. The tag is the root of the document. In HTML every element is enclosed in tags except DOCTYPE!

What is HTML Element? 

An HTML element contain two types of tag. Start tag and End tag. Content is always inserted between the Start and Ending tags.

content

HTML Element

Anatomy of HTML Element 

Now take a brief look at the HTML element.

Let’s break in down into different parts to understand more accurately.

  • Opening tag <>

  • Ending tag

  • The Content

  • The Element <> content

Opening tag: This involves an element called (p), wrapped in brackets with opening and closing angles. This determines where the element starts, or in which case the paragraph begins to come into effect.

Ending tag: It is the same as the opening tag only that it contains a dash in front of the name of the element. It indicates the end of the element when the paragraph ends. When a closing tag is not applied, it is one of the usual startup failures which can lead to odd outcomes.

The content:  it is the text or content of the element

The element: The aspect is the opening tag, the closing tag and the content enclosed in it.

Types of an HTML Element

  • Elements with Attributes

  • Nested Element.

  • Empty Element

Elements with Attributes 

Attributes provide relevant detail about the element in the individual contents that you do not wish to show. The class attribute allows you to define a description of the element that can be used later for the design and other details of the element.

A space between an attribute and the name of the element (or the earlier attribute if it already has one or more attributes) should always have the following.

  • The name of the variable of the same symbol preceded.

  • The meaning wrapped in quotation marks opening and closing

Nested Element. 

Elements may also be put in other elements, which are called nesting. Nesting of HTML elements (elements can contain elements) is possible.All HTML documents contain nested elements. Nested elements are used to add attributes to content separately.

It is important for elements to open and close properly so that they are noticeable within or outside. When you dint close a tag properly then the web browser is going to attempt to work out all possible suggestions, which may lead to unpredictable outcomes. Don’t do it, indeed! Don’t do it!

Empty Element 

There is no content in such elements and they are considered empty elements.

They have attributes, for example  tag  no closing tag          < /img > or internal information. It is because an element of the image does not pack content in order to embed it. This is intended to insert an image into the HTML page where it is displayed.

Leave a Reply

Your email address will not be published. Required fields are marked *