Get the latest news, exclusives, sport, celebrities, showbiz, politics, business and lifestyle from The VeryTime,Stay informed and read the latest news today from The VeryTime, the definitive source.

HTML Code for a Small Indent

25

    HTML Entity

    • HTML character entities are codes that represent reserved characters in HTML. Because HTML only recognizes one white space character at a time, you press the space bar multiple times to create a small indent. However, by using the "non-breaking space" entity, you can tell a Web browser to render as many white spaces as you want. Type " " or " " to create one space. Type the same code more times to add more spaces.

    Blockquote

    • The HTML "blockquote" tag is a block-level element that indents a block of text on the left, right, top and bottom. Type "<blockquote>" in your HTML document to open a blockquote tag, type the text that you want indented, then type "</blockquote>" to close the tag. A drawback to this tag is that not all browsers render the size of the indentation in the same way. While the difference is negligible, the chance exists that some visitors using Internet Explorer will not see your indented text the same as visitors using Firefox.

    Modifying Existing Tags

    • Modify existing HTML tags using a cascading style sheet to create an indent. For example, the "<p>" tag defines a paragraph in an HTML document. Use the CSS "text-indent" property to modify the paragraph tag so that the document indents the first line in a block of text inside a "<p>" tag. You can define the size of the indent using a length such as pixels or points, or by using a percentage.

    Custom CSS class

    • You can define your own class or rules using a cascading style sheet. Use the "padding" property to define the size of an indent around objects using a length or a percentage. You can also specify individual sides to indent by using the "padding-top," "padding-bottom," "padding-left" and "padding-right" properties. Call your indenting class in objects such as HTML "<div>" or "<p>" tags in your HTML document to apply the properties to them.

Source...
Subscribe to our newsletter
Sign up here to get the latest news, updates and special offers delivered directly to your inbox.
You can unsubscribe at any time

Leave A Reply

Your email address will not be published.