Technoarch Softwares - HTML

HTML

HTML is the bedrock of the world wide web. It is very easy to use HTML. All the browsers like Google, Firefox etc all read the HTML document.

HTML-INTRODUCTION

  • HTML - HYPER TEXT MARKUP LANGUAGE.

  • HTML is a document that contains Text (it's very easy to read and it‘s similar to like microsoft word or notepad or WordPad ).

  • HTML element tells the browser how to display the content on a webpage.

  • All the HTML element are represented by Tags .

  • Browsers do not display the HTML tags it just use to render the content of the page.

  • HTML is not a case sensitive.

HTML-Tags

  • <> : Angle Brackets Contain Tag

  • <BODY> - Something inside here </BODY> : Markup Element( all tags having a closing tag and the closing one is identified by the slash include with the starting tag) 

            Markup Element is a set of tags that has something that goes inside of it 

  • There are few tags where you don’t need to have an end tag and those are called empty elements  like  <BR> : This is a Line break(this tag is used for basically putting spaces between your lines but we don’t need to put anything inside that it’s just creating a line break so it’s doesn’t need an end tag so that’s why it’s called an empty element)  - Empty element 

Important Rules for using tags:

There are five important rules for coding with HTML tags.

  • Tags are always surrounded by angle brackets (less-than/greater-than characters), as in <HEAD>.

  • Most tags are available pairs and surround the fabric  they affect. They work sort of a light switch: the primary tag turns the action on, and also the second turns it off. (There are some exceptions. For example, the <BR> tag creates a blank line and doesn't have an "off switch." Once you've made a line break, you cannot unmake it.)

  • The second tag, the "off switch" always starts with a forward slash. As an example, you switch on bold with <B>, shout your piece, and then return to regular text with </B>.

  • First tag on, last tag off. Tags are embedded, so after you start a tag within another tag, you have to shut that inner tag before closing the outer tag. For example, the page won’t display properly with the tags during this order:

    <HEAD><TITLE>Your text</HEAD></TITLE>.

    The correct order is:

    <HEAD><TITLE>Your text</TITLE></HEAD>.

  • Many tags have optional attributes that use values to switch the tag's behavior. The <P> (paragraph) tag's ALIGN attribute, for example,allows you to change the default (left) paragraph alignment. As an example, <P ALIGN=CENTER> centers the next paragraph on the page.

Example: HTML  document:

  • The <!DOCTYPE html> declaration defines this document to be HTML5 and html document must start with a document type declaration .

  • The <html> element is the root element of an HTML page and all the tag inside html element.

  • The <head> element contains meta information about the document and include title tag and meta tag.

  • The <title> element specifies a title for the html document.

  • The <body> element contains the visible page content .

  • The <h1> element defines a large heading.

  • The <p> element defines a paragraph.

Html Element:

  • Html elements are the start tag and the close tag in which we inserted the content.

<tagname> Content inside here..</tagname>

  •  Empty elements are those having no content. Like <br> tag are empty element having no closing tag. It's just for line breaks.

For Example:

Output:

HTML Attribute:

  • All Html tags can have a attributes that provides a additional information about the element

  • Attributes defines in starting tag of html

  • Attributes are in the form of name and value pair(eg: name=”value”)

  • Href Attribute:

Href attribute is used with the anchor(<a>) tag. The  link address is specified in the href     attribute.

Code:

Output:

  • Src Attribute:

For Html images we use image(<img>) tag. Filename of the  image source is specified in the src attribute.

Code:

Output:

  • Width and Height Attribute:

Html images also have a width and height attribute for specified the width and height of the image

  • Alt Attribute:

If the image is not displayed then alt attribute is used for alternative text.

Code:

Output:

  • Style Attribute:

Style attribute is used for styling the html content like color,size,font  etc.

Code:

Output:

  • Lang Attribute:

Language of the html document is declared in the html tag with the Lang attribute.

Code:

Uses of HTML:

  • Web Pages Development

  • Web Document Creation

  • Internet Navigation

  • Responsive Images For Web pages

  • Data Entry support with HTML

Conclusion:

HTML is more complicated with its latest set of elements, and a large set of APIs. Anyone who can grasp the basic concept is a good start. Gone are the days, when HTML was synonymous with the usage of a certain set of elements, tags, and their attributes. With HTML, a developer has a lot of potential good tools and APIs in their arsenal, which can make its contemporary technologies lag behind. Usage is HTML is wide-spread and has become more sophisticated than ever before. It’s the developer’s ability to put applications of HTML concepts in real-time usage.

0 Comments:

Leave a Comments

Your email address will not be published. Required fields are marked *