is it possible to have styles and scripts in the body of an Html page? On a forum I use I have realized that I can use other html in it using inline styling but can I put this in the body and use it?
Is it possible to put this code straight into the body of the html file?
<!-- Scripts and Themes for Syntax Highlighter, put in place on this thread by Fabian Cook (CyberPython) - Moderator -->
<!-- Core JS File -->
<script src="http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js" type="text/javascript"></script>
<!-- Java Theme -->
<script type="text/javascript" src="http://alexgorbatchev.com/pub/sh/current/css/shBrushJava.js"></script>
<!-- Core Theme -->
<link href="http://alexgorbatchev.com/pub/sh/current/styles/shThemeDefault.css" rel="stylesheet" type="text/css" />
<!-- Core Style -->
<script src="http://alexgorbatchev.com/pub/sh/current/scripts/shAutoloader.js" type="text/javascript"></script>
<!-- Script to highlight syntax -->
<script type="text/javascript">SyntaxHighlighter.all()</script>
And then use this as well
<pre class="brush:java">
package tutorial;
import com.opensymphony.xwork2.ActionSupport;
public class HelloWorld extends ActionSupport {
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String execute() {
name = "Hello, " + name + "!";
return SUCCESS;
}
}
</pre>
Scripts included at any point but scripts may need to be included after
htmlcontent in some cases. Styles should not be.If you were wondering if you could directly enter the file contents, do it with
scriptandstyletags that have the same content as the linked files.