Format Text in XHTML


Before you can begin formatting text in XHTML, you have to understand how XHTML elements and attributes are used to present the data on a page on your website. There are several elements and attributes you can use to define and describe the content you wish to display. Understanding the XHTML tags will help you understand how these elements and attributes affect your content.

1. XML and HTML

There are differences between HTML and XML, and they will be apparent to web designers who have been using HTML for a while. In HTML, codes are not case sensitive, unlike in XML, which is strictly case sensitive and is written only in lower case. You can create your own tags in XML, which is not the case with HTML. When you use elements or tags in HTML, you don't necessarily have to close them with closing tags; XML requires that you properly close your tags so the content will be properly presented in the browser.

2. Attributes

Attribute names have to be written in lower case since XML is case sensitive. For example, an attribute for table width should be written

and never with capital letters such as "Width" or "WIDTH". This applies to all attribute names, so make sure to write them properly. XHTML attributes should not be shortened as they are in HTML. Take this code for example: . The check attribute was left as it is, which is acceptable in HTML, but when you use XHTML, you should complete the code, for example checked="checked". Other attributes like selected, disabled, nohref, or noresize should be written properly as selected="selected", disabled="disabled", nohref="nohref", noresize="noresize". The name attribute is no longer used in XHTML for elements like img, iframe, applet, and frame. In its place, we use the "id attribute". Instead of using the code for images , we use in XHTML.

3. XHTML Elements

Elements are used in XHTML as tags that contain attributes and data. They define which parts of the code are paragraphs, headings, inserted media, tables, or links. Block elements may contain the various levels of headings using the h1, h2, h3, h4, h5, and h6 tags. They also contain

tags to indicate a paragraph. Other examples of block elements are table tags , , and unordered list using the code
    .

    Understanding the differences between XHTML and HTML will help you produce clean code that is widely accepted by browsers and applications. W3C, or the World Wide Web Consortium, has agreed to make XHTML the standard, and it will do away with incompatible web pages and make formatting easier for all web designers.









    Format Text in XHTML


    Format Text in XHTML : Multi-thousand tips to make your life easier.


    Before you can begin formatting text in XHTML, you have to understand how XHTML elements and attributes are used to present the data on a page on your website. There are several elements and attributes you can use to define and describe the content you wish to display. Understanding the XHTML tags will help you understand how these elements and attributes affect your content.

    1. XML and HTML

    There are differences between HTML and XML, and they will be apparent to web designers who have been using HTML for a while. In HTML, codes are not case sensitive, unlike in XML, which is strictly case sensitive and is written only in lower case. You can create your own tags in XML, which is not the case with HTML. When you use elements or tags in HTML, you don't necessarily have to close them with closing tags; XML requires that you properly close your tags so the content will be properly presented in the browser.

    2. Attributes

    Attribute names have to be written in lower case since XML is case sensitive. For example, an attribute for table width should be written

    and never with capital letters such as "Width" or "WIDTH". This applies to all attribute names, so make sure to write them properly. XHTML attributes should not be shortened as they are in HTML. Take this code for example: . The check attribute was left as it is, which is acceptable in HTML, but when you use XHTML, you should complete the code, for example checked="checked". Other attributes like selected, disabled, nohref, or noresize should be written properly as selected="selected", disabled="disabled", nohref="nohref", noresize="noresize". The name attribute is no longer used in XHTML for elements like img, iframe, applet, and frame. In its place, we use the "id attribute". Instead of using the code for images , we use in XHTML.

    3. XHTML Elements

    Elements are used in XHTML as tags that contain attributes and data. They define which parts of the code are paragraphs, headings, inserted media, tables, or links. Block elements may contain the various levels of headings using the h1, h2, h3, h4, h5, and h6 tags. They also contain

    tags to indicate a paragraph. Other examples of block elements are table tags , , and unordered list using the code
      .

      Understanding the differences between XHTML and HTML will help you produce clean code that is widely accepted by browsers and applications. W3C, or the World Wide Web Consortium, has agreed to make XHTML the standard, and it will do away with incompatible web pages and make formatting easier for all web designers.


      Format Text in XHTML

      Format Text in XHTML : Multi-thousand tips to make your life easier.
      Format Text in XHTML
      Format Text in XHTML
      Recommend to friends
      • gplus
      • pinterest

      Comment

      Leave comment

      Rating

      Howtodotips howtodotips.net New York, USA NY 14612 US-NY P03TC0D3 US +1 987 654321