How to write css style in jsp: 1. Write it in jsp through inline style; 2. Use the "" tag to define an internal style sheet at the head of the document; 3. Use "< ;link>" tag links to the style sheet. </p></blockquote> <p><strong><img src="https://img.php.cn/upload/article/000/000/020/5fdabe4130ae0166.jpg" alt="How to write css style in jsp" ></strong></p> <p>The operating environment of this tutorial: windows7 system, css3 version. This method is suitable for all brands of computers. </p> <p>Recommended: "<a href="https://www.php.cn/course/list/12.html" target="_blank">css video tutorial</a>"</p> <p><strong>css style is written in jsp: </strong></p> <p>1. Inline style</p> <p>When a style only needs to be applied once to an element, to use inline styles, you need to use the style attribute within the relevant tag. The Style property can contain any CSS property. Inline styles lose many of the advantages of style sheets by mixing presentation with content. Please use this method with caution</p><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false"><div style="width:100px"></div></pre><div class="contentsignin">Copy after login</div></div><p>2. Internal style</p><p>When a single document requires a special style, an internal style sheet should be used. Internal style sheets can be defined at the head of the document using the <style> tag. </p><div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false"><head> <style type="text/css"> 样式 Copy after login3. External stylesWhen styles need to be applied to many pages, external style sheets will be the ideal choice. With external style sheets, you can change the look of your entire site by changing one file. Each page links to the style sheet using the tag. Tag in the head (of the document): Copy after login Priority comparison: Inline styles have the highest priority, followed by internal styles, and external styles have the lowest priority of.