close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues


Page optimization? - Inline JavaScript, CSS

Thread began 11/16/2011 8:38 pm by jciol2009 | Last modified 11/18/2011 10:19 am by Jason Byrnes | 753 views | 1 replies |


Page optimization? - Inline JavaScript, CSS


I've been noticing that CSS MenuWriter and CSS Sculptor throws in a block of inline CSS in <head> tag (A series of CSS to work around IE) and some inline JavaScript right after a block of menu list HTML tags. I'm a little concerned that this might affect web site performance as well as SEO, and it might be perceived as "bad coding practice" by some savvy clients even if it works and perfectly valid.

Is it really considered a "bad practice" to code HTML that way, or am I being paranoid? Is there a way to change this manually? What is WebAssist's stance in this?

Sign in to reply to this post

Jason ByrnesWebAssist

the css blocks in the head of the document are not Inline styles.

an inline style is one that is included with a tag using the style attribute:

<p style="border:1px solid #000000">Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p>

a style block defined in the head:

<style type="text/css" media="all">
p .addBorder {
border: 1px solid #000000;

Is referred to as an Internal style.

the example above can be applied to a paragraph tag using the class addBorder:

<p class="addBorder">Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p>

Inline styles are a bad practice. the driving concept behind CSS is to separate the design form the content. With inline styles, the design becomes part of the content.

with an Internal Styles and External Style (Styles defined in a linked .css file), the design is separated from the content.

The javascript applied by CSS Menu Writer is also not inline javascpt, it is not applied directly in an element.

It is used to create an event listener for the window.onLoad method, then trigger intializeMenu() function defined in the external javascript.
Defining the function in an external file is considered the correct practice, the code that calls the function will need to be in the main page.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...