HTML Tutorial Part-1: HTML Basics

HTML Tutorial Part-1: HTML Basics

What is HTML?

HTML is a computer language that allows you to display any information, image or video on the Internet. And to do this you need to create a web page. And the basic structure of a web page is created with HTML. HTML is not a programming language, it is called Hyper Text Mark Up Language. Mark Up Language is a set of Mark Up tags. How different parts of a web page are displayed through a browser is expressed in HTML using Mark Up tags.

History of HTML 

Marking Computer scientist "Tim Barnes-Lee" created the first HTML or Hyper Text Mark Up Language. The purpose of this was to facilitate the rapid transfer of scientific research data to different parts of the world. Then in the 1990's HTML was introduced through the Mosaic browser developed by NCSA. HTML3.2, first developed by W3C, was released in January 1997. At the end of the same year, in December, W3C released a new version of HTML, HTML4.2. In 2010, the latest version of the current HTML, HTML5, was introduced to the public.

Where and how to write HTML Code?

To write any program, one has to code using a code editor. For HTML coding you can use professional text editors such as: Visual Studio Code, Sublime Text, Atom.io, Brackets etc. Programs written in HTML can be saved by .html extensions such as index.html or test.html and viewed by any browser such as: Internet explorer, Mozilla Firefox, Google chrome and Opera.

Basic parts of the program in HTML :
Image

Open a notepad, type the code above and click Save as from the file menu. File name: test.html, Save as type: All files, save it and open the test.html file with Mozilla Firefox, it will look like the image shown below.

What do you need to learn HTML?
  • HTML Element
  • HTML Tag
  • HTML Attribute

Let's have a clear idea about the above three one by one.

What are HTML tags?

<> And two symbols and some pre-defined words like html, head, title, body etc. are used to write programs in HTML. <> Or a keyword written in the middle of a symbol is called a tag. Such as and. Is the body start tag and is the body end tag.

What is HTML Element?

In HTML, any beginning and end tag and the middle part are called the Element of the corresponding tag. E.g. <h1> This is an example of element. </h1>. This is an example of an element between the <h1> header 1 beginning and the </h1> header 1 ending tag. Is written, so this is an example of element. Is the element of the h1 tag. Some tags have no element, such as <br /> <img />, etc.

Usually tags that do not have a last tag do not have an element. This type of start tag includes the / sign, and is preceded by a space. And these are called HTML empty Element

What are HTML Attributes?

To increase the functionality of a tag in HTML, some pre-defined words in the starting tag are called HTML Attributes. Attributes are mainly used in HTML to increase the functionality of tags. For example, <font size = "5 ″ face =" Tahoma "color =" red "> Hello w3programmers. What will be the size of the text. Also face = ”Tahoma” is publishing the font of the text will be Tahoma and color = ”red” is publishing the text will be red.


What are HTML Entities?

In HTML, some special characters such as <,> symbols are usually used to write HTML tags, so if you type some of these, the browser mistakenly thinks it is a tag or can't display the information correctly according to our wishes. Some of the symbols like © ® ™ $ etc. are not typed on your keyboard for typing in the editor. Now if you want to display any such symbol on a web page, you can do so using HTML Entity.

Each entity begins with an ampersand (&) sign followed by its name and ends with a semicolon (;).

Entity can also be expressed with the name of each entity has a number as an alternative can also be expressed. Below are some of the name-based entities.



Some of the most widely used entities:

Their numbers are respectively

Result

What is HTML DOCTYPE Tag?

In HTML, the <! DOCTYPE> Tag is used to indicate to the browser what kind of HTML document you are writing. This declaration is based on which version of HTML you will use. As the above document is a document of HTML 5, so we write it as <! DOCTYPE html>. Thus, if it were version 1.0 of XHTML, the declaration would have to be given as follows:

What are HTML Comments?

Comments in HTML are explanations or footnotes of the source code of an HTML coder or programmer. We can also call it Coding Documentation. Usually, the compiler and interpreter of any programming language ignores the comments without executing them as code. With the Comments System, we will not only use HTML Coding Documentation at the moment, but we can also temporarily hide HTML Code that may be useful in the future.

How to comment in HTML?

Comment work is done in HTML with start tag. See the following example:

If you run the code above, you will not see the text in the comments in the browser.

Condition Comment

You can specify tags in the comments as an alternative to tags that are not supported in Internet Explorer browsers. This will allow the tags in the comments to appear correctly when these codes run in the Internet Explorer browser. See the example below:

Image

Leave a Reply

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