HOME
> Web design
> Frames With Html: How To Frame Your Elements
Frames with HTML: How to frame your elements
Design a frame with HTML, for example, to highlight some elements on your web page. To make the frame look the way you want it to in the end, you should define its properties with CSS. This also has the advantage that the loading time of the entire element is only slightly increased.
How to create the frame with HTML
Generally speaking, you can display a frame with HTML for any element on your web page. It is best to create the frame definition for this using CSS. To make a border visible, you need the following information:- Frame color: The corresponding command is border-color.
- Border width: Enter the border-width command for this.
- Type of border: Customize it with border-style.
Define different borders on a web page
Now if you want to border different elements, for example, images, individually, you must define the position of the border. Testen Sie dafür die folgenden Möglichkeiten aus:- top, right, bottom, left
- Um für den rechten Rahmen die Farbe, Strichstärke und Art zu definieren, geben Sie also ein: border-right: green 10px dotted
- Nutzen Sie außerdem die Kurzschreibweise, da Sie ansonsten schnell die Übersicht mit Ihren Definitionen verlieren.