Anya wrote the following code (example 1) and received the page shown in Fig. 1. But Anya needs there to be no space between the blocks, as well as to the right and left of the blocks. What changes to the code are required for this?
There is too much space between the title and body text, how can I reduce it?
To paragraph (tag
) and header (tag
) automatically adds top and bottom margins, which together give a large distance between the title and the text. To reduce the amount of indentation, you must explicitly add the margin-bottom property to the H1 selector. Moreover, you can set a positive, zero or negative value. In this way it is easy to set the desired indentation value.
How can I add a first line indent for each paragraph?
When you need to set paragraph indentation, it is best to use the text-indent style property. Its value determines how much to shift the text of the first line to the right from its original position. The width of the text block does not change and remains initially specified. The amount of indentation can be specified in pixels, percentages, or other available units (example 1).
How to remove indentation at the top and bottom of a list?
Use the margin-top and margin-bottom style properties for the UL or OL selector, depending on the list type. You can also use the generic margin property.
How to change indentation on a web page?
Padding on a web page, although not visible, does not allow content to fit flush against the edges of the browser window for a comfortable reading experience. You can set your own padding value by changing the values of the margin property of the body selector.
How to remove padding around a form?
When adding a form via a tag