Ответ 1
для этого вам в основном нужно настроить место для его размещения, а инструкция div работает.
<div style="width:150px;height:2px;background-color:#000000;"> </div>
на это также можно ссылаться:
.hr {width:150px;height:2px;background-color:#000000;} // in your css file/script
<div class="hr"> </div> <!-- IN HTML -->
Вы можете изменить позицию и увеличить ее/вниз или влево/вправо с помощью размещения css и z-index
.hr {width:2px;height:150px;background-color:#000000;position:absolute;top:0px;left:50px;z-index:10;} // in your css file/script
в основном
width = how wide you want it
height = how tall you want it
background-color = is the color you want it to be
position = absolute, relative, float - basically if it stays in one place or moves with page content
top = where to place in reference to top of page - could be margin-top
left = where to place in reference to left of page - could be margin-left