Slaiz Audio Player v2.0.3

00:00
00:00
Slaiz Playlist


All You Need to Know About HTML as a Programmer

Shalom Solomon

There has been quite a bit of ruckus on html. If you are a newbie into programming, one of the first languages you are meant to learn is html. Why is it so important? 
In this post, we 'd do a little run down on html and the major concepts involved in the language. 
Let's get to it then.

What is html?

HTML according to some sources is not an actual programming language; it is apparently a markup language. Nevertheless, html it turns out is quite as important as the other "legit" programming languages. Infact, all the webpages on the internet are written in html, this is because, html or markup languages are the only languages web browsers can read. 

HTML is an acronym for HyperText Markup Language. Where hypertext refers to texts that link to other resources on the web; resources such as videos, other webpages or websites. 

Concepts Worthy of Note in Html

Tags 
These are special words or characters wrapped in angle brackets < > that are used to specify the attributes of content on a webpage. Tags in html often start with an opening or starting tag which looks like this <a> and end with a closing or end tag which looks like this </a>. Note that I said most, that means some html tags do not have a closing tag; we'd get to them soon. 

Void or Empty Tags

Void or empty tags are tags in html that do not require a closing or end tag. They are called empty tags, because they do not have any content at all. They perform specific tasks. Common examples of void tags are <br> and <img>. When they are used in html, there is no need to attach a closing tag, they'd work just fine.

Now, there are some tags such as the <p> tag for whom closing tags are optional.

These tags have content, but they are also block tags, hence your browser automatically understands that this is what happens when I see this tag. Now this is only applicable when you start another of these kind of tags. 

For instance,
<p> Hello, this is an example. <p>For a blog post on html.
Your browser will read this as two paragraphs same way as if you used closing tags at the end of each paragraph.

Elements

 An element is an individual component of html that contains an opening tag and a closing tag with content in between. 

White Space

 In html, any space, tab or line breaks in your html text is known as white space. The unique thing about white spaces is that browsers would completely disregard or compress any and all whitespace(s) in your html text to a single space. Is this a good thing? I think this is a great feature because it allows for the developer to organise his/her code without affecting the end result.

Rules of Nesting

First off, what is nesting?

Nesting is a concept in coding that allows for bits of code or allows for an element to be written or placed inside another element. For instance,
<ul>
<li>house</li>
</ul>
The <li> element is nested in the <ul> element.

So, About Rules...

Rule Number #1
There are certain elements that cannot be nested inside others. I call them the big dogs. Apparently, in html there is a pecking order, and this is used to determine the hierarchy in which elements are nested. So if you nest a “big dog tag/element” in a smaller one, it is a syntax error. <ol> should not be nested in say <li>. 

Rule Number #2
When nesting elements, ensure that every tag you open is closed in a symmetrical order. Kind of like a reverse order; close tags in reverse of how they were opened. For instance, <ol> <li> an example </li> </ol>. 

Block and Inline Elements

Elements in html are of two kinds. Some are Block elements and others are Inline elements.


Block Elements:

Block elements are html elements that organise their content in blocks. They have top, bottom and side margins. Attributes can be assigned to block elements and they will affect the entire block of their content. 

Examples of block elements include: 
  • <div>
  • <p>
  • <ol>
  • <ul>

Inline Elements:

Unlike block elements, inline elements do not separate their content from other contents on the web page using margins. That means, they do not have margins. Inline elements flow with the rest of the content on a web page. Therefore, they cannot be used to format a block of content on a web page. 
Examples of inline elements include:
  • <img>
  •  <em> 
  • <strong> 
  •  <br>

Comments

Jhon Doe

- 20 October, 2018

Lorem ipsum dolor sit, amet consectetur adipisicing elit. Accusamus numquam assumenda hic aliquam vero sequi velit molestias doloremque molestiae dicta?

Jhon Doe

- 20 October, 2018

Lorem ipsum dolor sit, amet consectetur adipisicing elit. Accusamus numquam assumenda hic aliquam vero sequi velit molestias doloremque molestiae dicta?

Leave a comment

Extrigs! In Your Inbox

Don't miss out! Get the best of our blog posts directly in your mailbox.



You May Also Like

What is a Metaverse? What is Unique About Mark Zuckerberg's Metaverse?

...metaverse is not entirely new. It has been used some decades or so ago before the tech billionaire adopted it for his current project...

Technology

  • 1 year ago
  • Shalom Solomon

5 Things You Need To Know About The Newly Released eNaira

Nigerian President Muhammadu Buhari launched Nigeria's digital currency at the Presidential Villa in Abuja...

Business

  • 1 year ago
  • Shalom Solomon

MOBILE APPLICATIONS YOU CAN USE FOR GRAPHIC DESIGN

Do you know that your smartphone is not just a fancy gadget, but also a major source of income? I will tell you how.

Technology

  • 1 year ago
  • Shalom Solomon

TELEVISION ADVERTISING: The Best Ways to Use Television to Market Your Business

We will look at the most common and significant forms of television commercials for marketing your business...

Marketing

  • 1 year ago
  • Shalom Solomon

THE BASIC FORMS BROADCAST ADVERTISING CAN BE USED FOR MARKETING

Marketing works best with the right forms means to target your ideal customers. Learn the basic forms of broadcast marketing.

Marketing

  • 1 year ago
  • Shalom Solomon

IMPORTANCE OF PRINT MEDIA ADVERTISING FOR EVERY BUSINESS

See why print media advertising remains the best option for advertising your business...

Marketing

  • 1 year ago
  • Shalom Solomon

SEE AFRICA'S TOP 20 COMPANIES IN 2021!

We outline the top performing 20 African companies in 2021 ranked by their market capitalization as of March, 2021.

Business

  • 1 year ago
  • Shalom Solomon

WHAT EXACTLY IS A WEBSITE AND HOW DOES IT WORK?

Learn about the working of the websites on the world wide web...

Technology

  • 1 year ago
  • Shalom Solomon

How to Market Your Products Without Stress Using Affiliate Marketing

Discover how to market your products without stress through affiliate marketing.

Marketing

  • 1 year ago
  • Shalom Solomon

6 Reasons Why Your Advertsing Campaign Needs a Video Marketing Strategy

What is video marketing? Why does my business need a video marketing campaign strategy? This 2 mins read answers these questions.

Marketing

  • 1 year ago
  • Shalom Solomon