Open Notepad, or a text editor/code editor of your choice. Click the File menu. Click Open. Select an HTML file. Click Open.

Typeat the top of the document. Press the Enter key twice to add two new lines. Typeto close the head.

Alternatively, you can use an external style sheet for your HTML.

Type width: ##px; to set the line width. Replace ## with the number of pixels wide the line is. You can also use a percentage (%) instead of pixels (px). Type height: ##px; to set the line thickness. Replace ## with the number of pixels thick the line is. Type background-color: ##; to set the color of the line. Replace ## with the name of a color or a pound (#) followed by a hexadecimal color code. Type margin-right: ##px; to set the number of pixels from the right edge. Replace ## with the number or pixels or “auto”. Using “auto” will center the line within it’s specified width. The remaining space will be split evenly between the left and right margins. Type margin-left: ##px; to set the number of pixels from the left edge. Replace ## with the number or pixels or “auto”. Using “auto” will center the line within it’s specified width. The remaining space will be split evenly between the left and right margins. [2] X Research source Type margin-top: ##px; to set a top margin for the line. Replace ## with the number or pixels thick the margin is. Type margin-bottom: ##px; to set a bottom margin for the line. Replace ## with the number pixels thick the margin is. Type border-width: ##px; to create a border around the line (optional). Replace ## with the number of pixels thick the border is. Type border-color: ##; to set the border color (optional). Replace ## with the name of a color, or a pound sign (#) followed by a hexadecimal color code.

Click the File menu. Click Save As if starting a new HTML file. Click Save to save an existing HTML file. Type a name for the file next to “File name”. Type “. html” at the end of the file name. Click Save.

This is a heading


This is a paragraph text separated by a horizontal line

This is a heading


This is a paragraph text separated by a horizontal line

Open Notepad, or a text editor/code editor of your choice. Click the File menu. Click Open. Select an HTML file. Click Open.

Type


to change the thickness of the line. Replace # with the number of thickness (i. e size=“10”). Type
to change the line width. Replace # with the number of pixels wide, or percentage of the page width (i. e. width=“200”, or width=“75%”). Type
to change the color of the line. Replace # with the name of a color or hexadecimal code (i. e color=“red” or color="#FF0000"). Type
to align the line. Replace # with “right”, “left”, or “center” (i. e align=“center”>).

Click the File menu. Click Save As if starting a new HTML file. Click Save to save an existing HTML file. Type a name for the file next to “File name”. Type “. html” at the end of the file name. Click Save.

This is a Heading


This is paragraph text that has been separated from the heading by a line.

This is a Heading


This is paragraph text that has been separated from the heading by a line.