...tags Nonbreaking Spaces Suppose you want to use the phrase "12 Angry Men." Here, you would not want a browser to split the "12, Angry" and "Men" across two lines: ‘An example of this technique appears in the movie “12 Angry Men. In cases, where you do not want the client browser to break text, you should use a nonbreaking space entity &bsp; instead of a normal space. For example, when coding the "12 Angry Men” in a paragraph, you should use something similar to the following code: Example
An example of this technique appears in the movie "12&bsp;Angry Men. "
This is paragraph content.
....
is an HTML element,is starting tag of a paragraph and
is closing tag of the same paragraph butThis is paragraph
is a paragraph element. Nested HTML Elements It is very much allowed to keep one HTML element inside another HTML element: Exampleand other tags. We used them so far in their simplest form, but most of the HTML tags can also have attributes, which are extra bits of information. An attribute is used to define the characteristics of an HTML element and is placed inside the element's opening tag. All attributes are made up of two parts: a name and a value: + The name is the property you want to set, For example, the paragraph
element
in the example carries an attribute whose name is align, which you can use to indicate
the alignment of paragraph on the page.
The value is what you want the value of the property to be set and always put within
quotations. The below example shows three possible values of align attribute: left,
center and right.
Attribute names and attribute values are case-insensitive. However, the World Wide Web
Consortium (W3C) recommends lowercase attributes/attribute values in their HTML 4
recommendation,
Example
This para explains what is HTML
This para explains what is Cascading Style Sheet
The title Attribute The title attribute gives a suggested title for the element. They syntax for the title attribute is similar as explained for id attribute: The behavior of this attribute will depend upon the element that carries it, although it is often displayed as a tooltip when cursor comes over the element or while the element is loading. ExampleSome text...
This will produce the following result: & tutorialspoint 29HTML Some text. At this point of time, we are not learning CSS, so just let's proceed without bothering much about CSS. Here, you need to understand what are HTML attributes and how they can be used while formatting content. Intemationalization Attributes There are three internationalization attributes, which are available for most (although not all) XHTML elements. + dir + lang + xml:lang The dir Attribute The dir attribute allows you to indicate to the browser about the direction in which the text should flow. The dir attribute can take one of two values, as you can see in the table that follows: Value Meaning ltr Left to right (the default value) rtl Right to left (for languages such as Hebrew or Arabic that are read right to left) ExampleThe following word uses @
the following word uses a monospacedc/tt> typeface.
This will produce the following result: The following word uses a monospaced typeface. Superscript Text The content of a ... element is written in superscript; the font size used is the same size as the characters surrounding it but is displayed half a character's height above the other characters. & tutorialspoint 35HTML ExampleThe following word uses @ superscript typeface.
| This will produce the following result: The following word uses a ©" typeface. | Subscript Text The content of a ... element is written in subscript; the font size used is the same as the characters surrounding it, but is displayed half a character's height beneath the other characters, Example <1DOCTYPE html>the following word uses a subscript typeface.
This will produce the following result: The following word uses a subscip: typeface. & tutorialspoint 36Inserted Text HTML Anything that appears within ... element is displayed as inserted text. Example <1DOCTYPE html>I want to drink colac/del> winec/ins>
I want to drink colac/del> winec/ins>
The following word uses a big typeface.
| This will produce the following result: The following word uses a big typeface. Smaller Text The content of the ... element is displayed one font size smaller than the rest of the text surrounding It as shown belo\ Example <1DOCTYPE html>the following word uses a
, and , you have seen in previous chapter. This chapter will take you through all the important phrase tags, so let's start seeing them one by one. Emphasized Text Anything that appears within ... element is displayed as emphasized text. Example <{DOCTYPE htnl>tnphasized Text Exanple The following word uses a
enphasized typeface.
The following word has been marked with yellow
the following word uses a strong typeface.
This will produce the following result: The following word uses a strong typeface. Text Abbreviation You can abbreviate a text by putting it inside opening and closing tags. If present, the title attribute must contain this full description and nothing else. Example <1DOCTYPE html> ] | & tutorialspoint 42