HTMLWHALE-site-logo
  • HOME
  • VIDEO lesson
  • HTML Tags
  • Color Codes
  • Practice Codes

HTML CODE EXAMPLES


The <!doctype html> [doctype tag]

The <!doctype html> tag should be the first line of code that you should write when it comes to writing html codes. The foremost functionality of the <!doctype html> tag is to tell browsers that the document that is being loaded on is a HTML document.

Now you might ask, why is it so important to make mention of this, as if browsers are so dumb ? Ironically, they are. It is imperative to understand that there are several Markup languages available for placing the content online and HTML is just one of them. And that codes written in one language will not be compatible with the other.

So, just imagine you have given forth an invitation to your friends, and that they have mentioned to you that they would all have steak for dinner, and then suddenly on that very day, one of your friend turns up to say that he has become a vegetarian and would only want a vegetarian dish.

Given that you have already prepared and now someone is asking you for a change, realistically speaking,how would that go along with you?

In the case of browsers it is even more complex, for they would have to stick with language specifications mentioned in the page and any sway to the left or to the right would only make them unpopular among users which would subsequently result in their dismissal.

Secondly, as coder you wouldn't want your page half rendered to all your users, all because you failed to make mention of the language that you have used.

So in order to avoid all of these confusions, <!doctype html> is placed at the start of any html code

Please note:<!doctype html> never gets displayed on the browser. Also <!doctype html> is not case sensitive, but make sure to type it correctly.


TRY THIS CODE

<!DOCTYPE html>
<html>
<head>
<title>HTML doctype Tag</title>
</head>
<body>
<h3>The first line of code is there to tell the browsers <br>
that the document is going to be an HTML one <br> and that they would have to adhere to all of <br>
the HTML language specifications.</h3>
</body>
</html>

Output

Next

Comments

Read what our users ought to say: htmlwhale.com


100 Comments
  • Audrey:

    Aug 5, 2021 at 10:00 am
    I always wanted to start a side hussle and moreso, wanted it to be done at the comfort of my home. I joined an outsourcing agency, and the job was Data Entry. I used to spend long hours just entering the data. For every 1000 entries, I was offered $5, and just to make $50 I would have to spend the entire week and not to mention the back breaking unspoken labor that went in. It was then through a friend, I was introduced to htmlwhale.com. Honestly I should say, the moment the I heard the name, I felt, freedom, hope and assurance.Within 3 weeks, I was able to gain a decent level of mastery on webpage design and in 2 months time my work got attention.Now, am free at last and my passion has embroyed into a small business that has now afforded me a home and a car for which am very grateful.
    Reply
  • Denzel:

    Aug 31, 2021 at 10:37 am
    I worked at a tuition center working 10 hours a day. On top of the alloted work load, I had to do a lot of substituting for there were frequent tutor absentees. I wouldn't blame them, for the job was too demanding and the pay was peanuts. On one late evening while sitting at a coffee shop I met my one time school buddy. He was quick to notice my weariness and asked me why am still stuck there. He told me that the only way I could change my future if I did something about it. It was then he suggested me, htmlwhale.com, and advised me to try becoming a full stack web developer. I took his advice and from then there was no turning back. Today am happy with my job and I thank my friend for introducing me to htmlwhale.com.
    Reply
  • Julie Shen:

    Sep 5, 2021 at 11:00 am
    I would say, I was just lucky to come across this site. With wealth of information to understand webcreation and webdevelopment and with tons of video lessons providing explanation to every single line of code. :)
    Reply
  • Jonathan Bill:

    Aug 4, 2017 at 11:00 am
    All of my friends are talking about htmlwhale. I've even heard my mother talking about this when I expressed my desire to get into coding, and she was quick to point out as to how her friend's daughter had used it to clear a tech interview and that I should waste no time in shuttling with my decision. So here I am, going through every bit of the knowledge without shelling out huge sums of money. :)
    Reply
  • Mandy Wilson: Aug 4, 2017 at 11:04 am

    I'm a 30-year-old woman working for a fastfood joint, working 70hrs a week and this I did for 10 years. Everyday I had to wake up at 5am just to be able to reach my workspot on time to prepare the morning breakfast. It was then as by chance I met one of my former colleagues who used to work with me and it was he who gave me tap on my back. Infact, I could hardly recognize him, he was all bright. I never knew him that way, and ventured out with doctypeness to ask him the cause for his change. He spilled beans of lifechanging advice in a minute. All he said was, "Mandy, if you only were to work just half the working hours that you put here in, on your future, you could just live the way I live"It was as if a bolt struck me.From then on there was no turning back. Today, I am a webdesigner, and I am extremely greatful for all of the content and guidance that HTMLWHALE.com, has provided me.
    Reply
  • Dana Dowson:

    Aug 4, 2017 at 11:04 am
    I'd been trying to learn html for ages but often failed in my attempts. One main reason I would say is the lack of available content to have a grasp of the subject. Of course they say that there are a lot of websites that do provide Html content, but the major flaw in all of them is their inability to start the subject from basics and then gravitate towards proficiency. However, thankfully, I have found HTMLWHALE.com, and in all honesty, this is the only site that I have found to answer to all of the needs that any begineer would have. Today, I work in web developement and I attribute my succes to htmlwhale.com:)
    Reply
  • Sophia Fryer:

    Aug 4, 2017 at 11:04 am
    I was doing fairly well in school when I had to drop out because of low funds and I didn't like the idea of studying on debt. For I know with the changing world, only things that had direct application to solving people's problems had relevance. So I was always on the lookout for an opportunity that would allow me to work and study. This opportunity was offered to me by HTMLWHALE.com, which gave away technical knowledge free of cost to all those who are willing to accept and improve. Today, I have a small web development business. Of course, I cannot claim to know everything in webdevelopment, but I have HTMLWHALE.com, for reference and study, and that gives me the confidence I need to conquer.happiness!:) AMAZING, UNBELIEVABLE!
    Reply
doctype-img

HTML Complete CODE CATELOG:

  • <!doctype html>:Doctype Tag

    <!-->:Comment Tag

    <abbr>:Abbreviation Tag

    <address>:Address Tag

    <article>:Article Tag

    <aside>:Aside Tag

    <audio>:Audio Tag

    <bold>:Bold Tag

    <base>:Base Tag

    <bdi>:Bi Directional Tag

    <bdo>:Bi Directional Overide Tag

    <big>:Big Tag

    <blockquote>:Block Quote Tag

    Get HTML 5 cheat sheet A quick guide that comes in handy when it comes to working on a website design and time is a constraint.

  • HTML 5 study Vids:

    Complete set of HTML 5 study Vids that provides you with a greater understanding and knowledge doctype.

  • HTML 5 Canvas:

    A detailed tutorial on how HTML canvas works. This would be greatly useful if you wish to get into Graphics design.

  • HTML 5 Forms:

    A detailed tutorial on how forms work in HTML 5 and how they could be harnessed for better productivity.

HTML 5 Tags[New Addition]

htmlwhale-img
  • doctype doctype doctype
  • canvas command details
  • datalist embed figure
  • figcaption footer header
  • hgroup keygen mark
  • meter menu nav output
  • progress ruby section source
  • summary time video

To all those aspiring to work in webdevelopment for fortune companies, the number 1 advice I would like to give is this, "know your basics correct". For when you are strong in your foundation, you can simply scale any heights you aspire too. I am pleased to say that HTMLWHALE.com, has been doing a great job in exactly doing that, rendering service beyond expectations and always going that extra mile when it comes to helping people achieve the true best. Thanks a lot! -Gnan Bright-CEO What we fail to understand is that, though there is vast information resources floating everywhere, yet we don't see many using them to upgrade and uplift their economical condition. One main reason is that these so called availability of information is not well organized, meaning if you were to ask someone to use them, they would simply have no clue at all.So the underlying point to all of these pandemonium of chaos is, not provind content in the way they ought to be provided. Thankfully, my team and I have found a way out and that would be to use,HTMLWHALE.com. In all these years of my experience in using them and recommending them to others, the single most reaction that all of its users received is this, that the site is so well organized in content that any begineer on meticulous use of the site can and will become a pro at webdevelopment in weeks. This is so good for it would do wonders to all those who are aspiring to make their way into webdevelopment. Thanks a lot, you guys are indeed my heroes! -Martha Heyworth-CMO

HTML Complete

  • Knowlege is Power:

    Get htmlwhale.com learning guide. HTMLWHALE.com, adopts a step by step method in providing you knowledge and tools required to conquer webdevelopment

CSS Complete

  • Knowlege is Power:

    Get htmlwhale.com learning guide. HTMLWHALE.com, adopts a step by step method in providing you knowledge and tools required to conquer webdevelopment

JAVA SCRIPT Complete

  • Knowlege is Power:

    Get htmlwhale.com learning guide. HTMLWHALE.com, adopts a step by step method in providing you knowledge and tools required to conquer webdevelopment

  • Terms and Conditions
  • Privacy Policy
  • Contact
© 2021HtmlWhale.com™ .All Rights Reserved
  • Complete HTML Training-from Basics to Advance Start Today: POWERFUL
  • Click Here