HTML5 Basics–Practice 1

The following is for your practice. Please do not copy paste. Try to read and then write the code yourself. You can use notepad++. It is a better version of notepad. You can open multiple tabs and work on them simultaneously.

You can open a file and save it with the extension you want. For example, you open a new page and save it with the .html(hypertext markup language) extension. When you type your code, it will start giving you options of different tags you can use.

So following is the code you need to type once you have saved your file with .html extension. Please use proper indentation. It helps understand the code better.

“Code starts”

<!DOCTYPE html>
<html>
<head>
<title>First Page</title>
</head>
<body>
<h1>First Page Heading 1</h1>
<p>Paragraph 1</p>
<h2>First Page Heading 2</h2>
<p>Paragraph 2</p>
<h3>First Page Heading 3</h3>
<p>Paragraph 3</p>
<h4>First Page Heading 4</h4>
<p>Paragraph 4</p>
<h5>First Page Heading 5</h5>
<p>Paragraph 5</p>
<h6>First Page Heading 6</h6>
<p>Paragraph 6</p>

<a href=”https://www.workeatpraylove.com “>Click on this line to see my website!!</a>
</body>
</html>

“Code ends”

Let us explain a few things from the above code. Every HTML5 document starts with “<!DOCTYPE html>”. My friend, who is teaching me HTML5, told me that earlier it used to be a long code. Now it has been reduced. Elements are represented by tags. For example, <h1> is the opening tag and </h1> is the closing tag. There are 6 different types of heading used. Once you execute it, you will come to know about the difference. The page has a head tag and a body tag. Head contains the meta information and body contains the visible part of the page. <p> tag is used for paragraph element. When you view the content in a browser, you will find that between the paragraphs, some space has been automatically added by the browser. Also, the browser will remove the extra space on its own while displaying the content. Refer HTML5 Basics–Practice 4 for this.

Note: The closing tag is not necessary, but we should use the closing tag. Sometimes not using those might lead to errors.

Headings are important as search engines use these to index the content. Also, we should not use headings for content.

Code: <a href=”https://www.workeatpraylove.com “>Click on this line to see my website!!</a>

In this when we click on the sentence “Click on this line to see my website!!”, it will take us to the website “https://www.workeatpraylove.com “. <a> tag is used for HTML links. The link is defined in the href attribute.

Try to experiment with the code.

Advertisements

15 thoughts on “HTML5 Basics–Practice 1

  1. parfum yang mengandung pheromone says:

    Wonderful goods from you, man. I’ve understand your stuff previous to and you’re just extremely fantastic. I actually like what you’ve acquired here, certainly like what you are stating and the way in which you say it. You make it entertaining and you still care for to keep it smart. I can not wait to read far more from you. This is actually a terrific site.

    Like

  2. wedding organizer bandung says:

    I would like to start a site for my Roller derby team, every we have is definitely a myspace right now. How can I start a site that has a department of transportation com, or html, etc, that I may design by myself, and keep up on my own to ensure that we can actually have a internet site for fans to go to???? Thanks any and all help valued..

    Like

  3. Pheromone says:

    Hello everyone,.. We are thinking of buying a new pc to run an Adobe CS4 Suite. Allow just say the Master bedroom. I’m mostly going to end up being running Premiere, Illustrator and Photoshop. I would like a computer that is going to completely master without any complications whatsoever. Cost is no problem, I want to do that right… I want the computer to run as many applications I need at the same time flawlessly with no slowing down or crashing. Any ideas?.

    Like

  4. illinois river float trip says:

    heyas: -). how are you most?. well i love to write and i rele want to get into creative composing and but i have a hard time coming up with concepts on what to write about and was questioning if you understood how i could get over this “writer’s block”?.. thanks so much!!.

    Like

  5. hipnoterapi di jogja says:

    Hey I was wondering if anyone could tell me which universities are the best (anywhere) for innovative writing? I am just not interested in any colleges in ontario because they dont offer the type of courses I want. I used to be also questioning if maybe there are institutions specifically for creative writing? Make sure you help me out, I have to apply in Dec, and I have no idea exactly where I’m going, I simply know that I wish to write, mainly because writing is my life, and I cant find myself performing anything else. Thanks a lot..

    Like

  6. psikotes calon tki says:

    I would like to create my own website yet I have no experience. A classmate suggested me to instead produce a blog to ensure that I can get experience.. What free blog site should I use?. Any tips?.

    Like

  7. Melialpr says:

    Hi I am a new blogger and it would be awesome if you guys checked out my blog I am a motivational writer and I admire bloggers that know how to be real and inspiring. If you are looking for some motivation and fun check it out.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s