Skip to main content

Command Palette

Search for a command to run...

Introduction to HTML

Updated
3 min readView as Markdown
Introduction to HTML
O

I'm a software developer based in Nigeria. I specialise in building web applications. I find both front-end and back-end development interesting and fun. I enjoy building things that live on the internet, whether it's a website or an application. I'm passionate about creating innovative solutions and exploring new technologies. I always seek new challenges and opportunities to grow as a developer. I'm open to new opportunities and collaborations.

Hello and welcome once again. It's been a very busy period for me, learning, unlearning and relearning but the goal remains the same - be a better developer. And I'm going to take a week long break from coding to do a 7-day blogging streak.

Today, we're going to into learning proper. So what is HTML??

What is HTML

HTML stands for HyperText Markup Language. To simply put, it is a language used for marking or tagging a document that indicates its logical structure (such as paragraphs, sections, header etc) and gives instructions for its layout on the page especially for electronic transmission and display. Forget all the technicalities and let's see some example.

This is what a simple HTML code looks like in the text editor

So, HTML defines the file structure(or skeleton, if you want) and is the primary markup language of the World Wide Web. Yes, there are other markup languages. BBC, SGML and XML are markup languages too but HTML5 is the primary markup language of the web. It was developed and being maintained by WHATWG (Web Hypertext Application Technology Working Group). The current version of HTML is HTML5.

File Extension, Declaration and Syntax

An HTML file is prefixed with an extension of ".html" (or ".htm"). Both are basically the same (like jpg and jpeg). ".html" file extension was the original file extension for HTML pages running on Unix web servers. The only difference between the two is that ".htm" is used as an alternate to . html by few servers that do not accept four character extensions. In an html file, the document type must be declared at the top of the page(yes, web servers read the document from top to bottom, left to right just like you and I) so as to avoid conflicts. An the syntax for declaring the document type is <!DOCTYPE html>. The declaration is not an HTML tag. It is an "information" to the browser about what document type to expect. There are several valid syntaxes that are allowed. They are as follow:

<!DOCTYPE html>
<!DocType html>
<!Doctype html>
<!doctype html>

HTML syntax is really simple, the file consists of tags enclosed in angle brackets < >. HTML tags are like keywords which defines that how web browser will format and display the content. With the help of tags, a web browser can distinguish between an HTML content and a simple content. They are a few rules to be followed when writing html codes.

  • All tags must be enclosed in angle brackets.
  • All tags must have an opening and closing tag(except for a few ones that would be explained in the coming posts).
  • All tag names must be lowercase and with no spaces in between the characters(i.e. letters).

Overall, the HTML syntax is easy to grasp and as you start coding, which I strongly advise, you will find the concept simple. Hopefully, I've been able to explain this in the most comprehensive way. An just so you know, there's more to coding than just writing codes, try to learn the concepts and contexts too. In the next post(hopefully tomorrow), I'll be talking about HTML tags and their uses.

And before you go, please leave your comments, suggestions or questions and I will make sure to do the needful. Thanks and goodbye.