What is HTML Spacing?

Hypertext Markup Language (HTML) spacing is the use of encoding to create a certain amount of white space around words, paragraphs, images, or table cells in an HTML document. HTML spacing tags are visible only when a programmer or web designer is working with HTML in a plain text document or web design program. When a page is rendered in a web browser, the spacing marks are replaced by their designated measurements of white space. The most common tags for HTML spacing include the whitespace tag, margin adjustment tags, line break tag, and cell padding tags for spacing in tables. Correct use of HTML code for spacing is considered important for creating web pages with visually appealing white space and clean-looking text.

HTML spacing involves the correct use of HTML code to create white space on web pages.

One of the first spacing tags most web page designers learn about is the whitespace tag. This tag uses an abbreviation for “nonbreaking space”. Typing this HTML tag is a quick way to indent a paragraph or move an anchored image to the desired position on a page. A single whitespace tag creates a small increment of space before a word or image, so it usually needs to be typed about three times for proper paragraph indentation. A shortcut to this HTML code is to copy the first tag and paste it into the HTML editor as many times as necessary.

Line break tags for HTML spacing are tags designed to control where text on a web page breaks on a following line.

Line break tags for HTML spacing are tags designed to control where text on a web page breaks on a following line. Since web browsers automatically wrap text after it reaches the right side of the page, inserting line break marks gives the web programmer control of where a new line of text begins. Including a block of text in these tags designates a paragraph, and including margin tags also controls the amount of white HTML spacing that frames a group of paragraphs on a web page.

See also  What is read and write memory?

A web programmer types margin tags for HTML spacing in the opening body tag of an HTML document. Margins at the top, bottom and sides of a web page are measured in pixels , and most web browsers have default margins of 10. An opening tag that changes these margins is inserted with the desired number of pixels from margin between quotes. Spacing in an HTML table is known as cell padding because the designated white space fills the text or images in each cell of the table. Writing HTML code for table spacing is done by inserting a tag with the selected numbers of pixels designated in quotes.

Leave a Comment