BASIC TAGS HTML22

 

HTML Editors

1

Step 1: Open Notepad (PC) Windows 8 or later: ...

2

Step 1: Open TextEdit (Mac) Open Finder > Applications > TextEdit. ...

3

Step 2: Write Some HTML. Write or copy the following HTML code into Notepad: ...

4

Step 3: Save the HTML Page. Save the file on your computer. ...

5

Step 4: View the HTML Page in Your Browser.

HTML for Absolute Beginners

While many guides on the internet attempt to teach HTML using a lot of mind-boggling theory, this tutorial will instead focus on giving you the practical skills to build your first site.

The aim is to show you ‘how’ to create your first web page without spending the entire tutorial focusing too much on the “why.”

By the end of this tutorial, you will have the know-how to create a basic website and we hope that this will inspire you to delve further into the world of HTML using our follow-on guides.

What is HTML?

Okay, so this is the only bit of mandatory theory. In order to begin to write HTML, it helps if you know what you are writing.

HTML is the language in which most websites are written. HTML is used to create pages and make them functional.

The code used to make them visually appealing is known as CSS and we shall focus on this in a later tutorial. For now, we will focus on teaching you how to build rather than design.

The History of HTML

HTML was first created by Tim Berners-Lee, Robert Cailliau, and others starting in 1989. It stands for Hyper Text Markup Language.

Hypertext means that the document contains links that allow the reader to jump to other places in the document or to another document altogether. The latest version is known as HTML5.

A Markup Language is a way that computers speak to each other to control how text is processed and presented. To do this HTML uses two things: tags and attributes.

What are Tags and Attributes?

Tags and attributes are the basis of HTML.

They work together but perform different functions – it is worth investing 2 minutes in differentiating the two.

What Are HTML Tags?

Tags are used to mark up the start of an HTML element and they are usually enclosed in angle brackets. An example of a tag is: <h1>.

Most tags must be opened <h1> and closed </h1> in order to function.

What are HTML Attributes?

Attributes contain additional pieces of information. Attributes take the form of an opening tag and additional info is placed inside.

An example of an attribute is:

<img src="mydog.jpg" alt="A photo of my dog.">

In this instance, the image source (src) and the alt text (alt) are attributes of the <img> tag.

Golden Rules To Remember

1.   The vast majority of tags must be opened (<tag>) and closed (</tag>) with the element information such as a title or text resting between the tags.

2.   When using multiple tags, the tags must be closed in the order in which they were opened. For example:

<strong><em>This is really important!</em></strong>


SRC:- https://html.com/#ixzz7J40bQ8j3

Here, we have the following:

  • <!DOCTYPE html> — doctype. It is a required preamble. In the mists of time, when HTML was young (around 1991/92), doctypes were meant to act as links to a set of rules that the HTML page had to follow to be considered good HTML, which could mean automatic error checking and other useful things. However these days, they don't do much and are basically just needed to make sure your document behaves correctly. That's all you need to know for now.
  • <html></html> — the <html> element. This element wraps all the content on the entire page and is sometimes known as the root element.
  • <head></head> — the <head> element. This element acts as a container for all the stuff you want to include on the HTML page that isn't the content you are showing to your page's viewers. This includes things like keywords and a page description that you want to appear in search results, CSS to style our content, character set declarations, and more.
  • <meta charset="utf-8"> — This element sets the character set your document should use to UTF-8 which includes most characters from the vast majority of written languages. Essentially, it can now handle any textual content you might put on it. There is no reason not to set this and it can help avoid some problems later on.
  • <title></title> — the <title> element. This sets the title of your page, which is the title that appears in the browser tab the page is loaded in. It is also used to describe the page when you bookmark/favorite it.
  • <body></body> — the <body> element. This contains all the content that you want to show to web users when they visit your page, whether that's text, images, videos, games, playable audio tracks, or whatever else.
 

 

Basic HTML tags

These are the other tags that HTML commonly uses in documents. They are not required but when used are very effective in creating professional effective websites.

 

Open tag

Close tag

Description

Example

<p>

</p>

This tag allows you to create paragraphs

My name is Fred.
I live in Medway

<h1>

</h1>

This is the largest heading

Heading 1

<h2>

</h2>

This is second biggest heading

Heading 2

<h3>

</h3>

This is the next heading

Heading 3

<h4>

</h4>

This is another heading

Heading 4

<h5>

</h5>

This is the second smallest heading

Heading 5

<h6>

</h6>

This is the smallest heading

Heading 6

<hr >

n/a

This is a horizontal line. You can use width and size attributes


<b>

</b>

This makes text bold

Bold text

<i>

</i>

This makes text italic

Italic text

<br />

n/a

This tag allows you to insert line breaks

abc
def

 SRC:-https://www.cs.kent.ac.uk/teaching/10/modules/CO/3/32/FIT_Chapters/Chapter04/BasicHTMLTags.html

 

Comments

Popular posts from this blog

HTML_PRINT22