Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8124671
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T06:32:06+00:00 2026-06-06T06:32:06+00:00

is it possible to have styles and scripts in the body of an Html

  • 0

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>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T06:32:08+00:00Added an answer on June 6, 2026 at 6:32 am

    Scripts included at any point but scripts may need to be included after html content in some cases. Styles should not be.

    If you were wondering if you could directly enter the file contents, do it with script and style tags that have the same content as the linked files.

    <script>
        //code...
    </script>
    <style>
        /* styles */
    </style>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to nest selectors within selectors? I have a lot of styles
Possible Duplicate: Default textbox border-style and width I have some TextBox on my page
Is it possible to have a free iPhone app that has say an initial
I have designed a website that consists of the body, a container to hold
I have a page with several tabs that show similar content, to make sure
Doubt this is possible as I don't have a 1 page app, but pretty
I have simple html code that plays YouTube video after click on the image:
I'd like to have an HTML page which displays a single PNG or JPEG
Is it possible to re-use a client-template using asp.net ajax 4.0 client templates? I
Possible Duplicate: How to change/remove CSS classes definitions at runtime? I have a HTML

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.