Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,159,039 members, 7,838,602 topics. Date: Friday, 24 May 2024 at 06:21 AM

HTML Tutorial I: Introduction To HTML - Webmasters - Nairaland

Nairaland Forum / Science/Technology / Webmasters / HTML Tutorial I: Introduction To HTML (434 Views)

Newly Launched HTML Tutorial Website / Need A Web Designer To Join Me On A Project Psd To Html And Wordpress / Beginner's HTML Tutorial 3 - Text Editors (2) (3) (4)

(1) (Reply)

HTML Tutorial I: Introduction To HTML by Nobody: 8:31am On Oct 09, 2015
HTML stands for HyperText Markup Language.

Let’s look in more detail what this means.

‘Markup’ in computing means adding extra data to text in order to tell computers more information about that text. For example, in HTML we tell the computer which parts of the HTML document are to be displayed, which parts make up the navigation, even which parts are titles and which are content.


What is a HTML document?

A HTML document is just what it sounds like – a document that contains HTML! It’s nothing more special than that. All we have to do is type our HTML into a document in a writing program – for example Notepad, or even Microsoft Word – and we have a HTML document.

Starting from the next lesson of this course we’re going to make our own simple HTML pages on our own computers, and learn all about HTML as we go.

First let’s understand what makes HTML special.

What are HTML tags?

HTML is just normal text, with additional information. This additional information is delivered through tags. Tags are the fundamental building blocks of HTML.

A tag looks like this:

<tag>

Anything inside the “<” and “>” symbols defines the tag.

Can anything be a HTML tag?

Yes and no. Technically you could put anything inside a “<” and “>” symbol. However, browsers only understand certain tags, so unless you use the tags that are officially defined as part of HTML then your tags will not work correctly.

We will learn all about the important HTML tags as we proceed through this course.

More about tags

Tags can be both opened and closed. For example, let’s look at a <span> tag (don’t worry about what a <span> tag is for now – we’ll get to it later):

<span>This is inside my span! I can put anything I like here.</span>

You can see that a tag is opened by having an initial tag such as <span>. It is then closed with a second tag that has an additional “/” symbol. Anything can go between the opening and closing tags – this is known as the tag contents.

This whole example from the opening tag to the tag contents to the closing tag is known as a HTML element. In this case we have created a span element, because we are using a span tag to define the element.

Elements are made up of tags.

Self-closing Tags

Some tags don’t require opening and closing tags, they can effectively open and close themselves in just one tag. These are often known as self-closing tags.

Technically in HTML 5, which is currently the most advanced version of HTML, self-closing tags don’t actually close themselves, but it’s a helpful way to picture what is happening. (If you’re interested in why: it’s because HTML is similar to a markup language called XML. In XML tags are required to either be closed in a pair, or to self-close. HTML is not as strict as XML, so you don’t have to self-close your tags. However, it doesn’t hurt, and keeps your HTML neat so it is not a bad habit to have.)

A self-closing tag looks like this: <tag />

Tags that can exist on their own, i.e. be self-closed include: <img />, <link /> and <meta />, amongst others.

Again, we will understand more about each of these tags as we encounter them when we start building our own website!

Tag attributes

The last important concept to understand about tags is that tags can have attributes as well as contents. Let’s add an attribute to our <span> tag from before:

<span class=”exampleTag”>This is inside my span! I can put anything I like here.</span>

Now our tag has a class attribute. Attributes can have values. In this case our attribute has the value exampleTag.

As with tag names, attributes can technically be anything. For example, we could have said:

<span lemon=”fruityAttribute”>This is inside my span! I can put anything I like here.</span>

This gives our <span> tag an attribute named “lemon” and with a value of “fruityAttribute”.

However, just like with tags there are certain attributes
Re: HTML Tutorial I: Introduction To HTML by Nobody: 8:32am On Oct 09, 2015
And these attributes will be discussed in the next lessons
http://naijatechies.tk/forum2_theme_112425096.xhtml?tema=1

(1) (Reply)

Even More Online Start Up To Make More Money / deleted / Accountpolicy.com For Sale

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 15
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.