Hello Guest! You are not logged in!! Login |
||
| You are on | | Tutorials / HTML / Tags in HTML |
Internet and world wide web
Tags in HTML
URLs in HTML
Planning and designing a website
Structure of the HTML document
Setting Document background
Chapter 2: Working with Text
Chapter 3: Working with images
Chapter 4: Audio and videos
Chapter 5: Hyperlinks
Chapter 6: Tables
Chapter 7: Forms
Chapter 8: Frames
Chapter 9: CSS
Chapter 10: HTML entities
Chapter 11: HTML colors
HTML Tags |
| |
An HTML document is a text file that contains only text. When a browser opens an HTML file, it looks for HTML commands in the text and uses them to display text, images, or create links to other web pages. Since HTML documents are just text files, they can be written in a simple text editor. In these tutorials we will use Notepad to create HTML documents. |
| HTML tags: |
HTML commands are called markup tags (Tags for short). Each tag is written between angular brackets < and > ( Less than and more than signs ). HTML tags are written according to a certain syntax show below |
![]() |
The following is an example of a paragraph tag. This tag displays the text " Hello world " in a paragraph. <p> Hello World </p> |
Tag attributes: |
An HTML tag may have one or more attributes. An attribute is used to specify a property of the tag. Attributes are included in the starting tag, between the tag name and the final bracket (>). Attributes have values. For example the ALIGN attribute have the values of left, right or centre. Values are enclosed in quotation marks ( "" ) - Straight quotes. For example, the following tag displays the text HELLO WORLD as a centre-aligned paragraph.
<p align="center">Hello world </p> |
Nested Tags: |
A tag contained within another tag is called the nested tag. For example, the <b> tag is used to make text bold. This tag may be written within a paragraph tag: <p>Hello <b>world </b> </p>
The following rules are followed while writing the nested tags.
The following HTML code displays World in bold and italic. Notice the order of the ending and starting tags. <p>Hello <i><b>world </b></i> </p> |
| Case sensitivity:
|
HTML code can be written in either lowercase, uppercase or a combination of the two. It is case insensitive. Usually tags and attributes are usually written in uppercase to make them different from the text that is to be displayed. XHTML, the next version of HTML, uses lowercase and to maintain the compatibility with XHTML, tags and attributes should be written in lowercase. |
Block tags and inline tags: |
Some tags, such as paragraph tag <p>, include line breaks. When a closing paragraph tag is used, there is no need to press Enter to begin a new paragraph with a new line. These tags treat the contents within them as one unit or block. These are called block level tags. Some commonly used block level tags are <p>, <h1>, <br>, <ul> and <table>.
Other tags are called inline tags. These tags affect only a few letters or words and they don't contain a line break within the closing tag. Bold < B >, Italics < I > and font <font> are examples of inline tags. |
Projects and solutions
| HTML Tutorials |
| Database Tutorials |
| Video Tutorials |
| C++ codes |
| We have 153 codes of C++ Algorithm codes: 12 Beginners codes: 66 Compiler codes: 1 Data structure codes: 12 File Handling codes: 6 Games codes: 4 Graphics codes: 10 Mathematics codes: 10 OOP codes: 28 Virus codes: 1 |
| We have 33 HTML tutorials in our tutorials section. |
| |
| We have 121 technology and computing reviews articles. |
| We have covered 81 topics of database in our database tuorials section. |

