Page 77 - C_GPT _V4 _class_6
P. 77
TAGS AND ATTRIBUTES
Factbot
As we know, HTML is a markup language. It uses tags to markup the content of the web pages. These
HTML was created by Tim Berners-Lee in early 1990s but was not officially released. It was tags also have attributes. Let us learn more about tags and attributes.
published in 1995 as HTML 2.0. It is a subset of Standard Generalized Markup Language (SGML).
Tags
Tags are the basic building blocks of a web page. They tell the browser how the information is to be displayed
Hypertext on the web page. Tags do not appear in the browser window but they affect the display of the text and
non-text items within it. Each tag in HTML follows specific rules and syntax. HTML tags are not case-sensitive.
Hypertext is a piece of text that has the special feature of linking to another document or web page. In HTML document, a tag name begins with an opening angular bracket (<) and ends with closing
Markup Language angular bracket (>). For example,
<TagName> content </TagName>
Markup Language is a language that uses special symbols called tags to mark up a text document and
instructs the browser how to display the text.
Opening tag Closing tag
Key Features of HTML5
Both the opening and closing tags are the same. The only difference is that the closing tag contains
Some of the important features of HTML5 are: a forward slash before the tag name. Most of the tags in HTML have opening and closing tags. A
CSS is like the colour and
It is a platform-independent language. texture of a flower or leaf, combination of an opening tag, content, and closing tag is called an element.
It allows us to build tables. which enhances the plant's The HTML tags can be categorised as:
visual appeal. Container Tags: The tags that have both opening and closing tags are called Container Tags.
It allows us to add links on the web page.
It is not a case-sensitive language. For example <b> ...... </b>
It is a very easy and simple language. <head> ...... </head>
It provides a flexible way to design web pages along with the text. Empty Tags: Empty tags contain only an opening tag. They do not have a closing tag. These tags do
not enclose any data.
Types of HTML Editor For example <br>, <hr>, etc.
There are mainly two types of HTML editors: WYSIWYG editors and Text editors. Let us now discuss HTML tags can also be further classified as:
these editors. Block Level Tags: The block level tags take up the full width available and by default begin on a new
line. Some of the block level tags are Paragraph <P>, headings <H1> to <H6>, Horizontal Rule <HR>, etc.
WYSIWYG Editor
Text Level Tags: The text level tags are used to mark up parts of the text. These tags do not start with
WYSIWYG stands for What You See Is What You Get. This type of editor allows the developer to see a new line. Some of the text level tags are Bold <B>, Superscript <sup>, Italic <i>, Subscript <sub>, etc.
what the end result will look like when the document is created. These editors provide various tools and Nesting of Tags
graphical interfaces for designing web pages. Examples of WYSIWYG editors are Adobe Dreamweaver,
Amaya and Google Web Designer. Nesting of tags means that you can start a new tag before closing the previous tag. The key point to
remember is that tags are nested based on the LIFO principle, that is, Last In First Out. This means that
Text Editor the tag that has been opened last needs to be closed first. For example: <body> <h1> Happy Coding
We can create HTML documents using normal text editors like Notepad or Wordpad. The user should ! </h1> </body>
have a proper knowledge of the HTML commands to develop a web page in Text Editor.
Attribute
An attribute is a property that provides additional information about a tag. It enhances the
Suppose, writing HTML5 code was like casting a spell. What kind of digital spells would you functionality of a tag. It is always specified inside the opening tag. All attributes consist of two parts—
create, and what effects would they have on your web page? a name and a value.
The ‘name’ is the property that you want to set.
The ‘value’ is what you want for the respective property.
Introduction to HTML5 & CSS3 75

