html

How can I create a site in php and have it generate a static version?

For a particular project I have, no server side code is allowed. How can I create the web site in php (with includes, conditionals, etc) and then have that converted into a static html site that I can give to the client? Update: Thanks to everyone who suggested wget. That's what I used. I should have specified that I was on a PC, so I g...

Error Tolerant HTML/XML/SGML parsing in PHP

I have a bunch of legacy documents that are HTML-like. As in, they look like HTML, but have additional made up tags that aren't a part of HTML <strong>This is an example of a <pseud-template>fake tag</pseud-template></strong> I need to parse these files. PHP is the only only tool available. The documents don't come close to being we...

Add a linebreak in an HTML text area

Hello all, How can i add a line break to the text area in a html page? i use VB.net for server side coding. ...

When is a CDATA section necessary within a script tag?

Are CDATA tags ever necessary in script tags and if so when? In other words, when and where is this: <script type="text/javascript"> //<![CDATA[ ...code... //]]> </script> preferable to this: <script type="text/javascript"> ...code... </script> ...

How do I create a link to a footnote in HTML?

For example: This is main body of my content. I have a footnote link for this line [1]. Then, I have some more content. Some of it is interesting and it has some footnotes as well [2]. [1] Here is my first footnote. [2] Another footnote. So, if I click on the "[1]" link it directs the web page to the first footnote ...

IE7 CSS Scrolling Div Bug

I recently came across an IE7 only bug that I thought I'd share so when I come to this site 6 months from now to figure out the same thing, I'll have it on hand. I believe the easiest way to recreate this bug would be the following: <div style="overflow: auto; height: 150px;"> <div style="position: relative;">[...]</div> </div> ...

What is the best free way to clean up Word HTML?

Please provide the single best option you are aware of. ...

JavaScript to scroll long page to DIV

I have a link on a long HTML page. When I click it, I wish a DIV on another part of the page to be visible in the window by scrolling into view. A bit like EnsureVisible in other languages. I've checked out scrollTop and scrollTo but they seem like red herrings. Can anyone help? ...

text watermark on website? how to do it?

I am a C++/C# developer and never spent time working on web pages. I would like to put text (randomly and diagonally perhaps) in large letters across the background of some pages. I want to be able to read the foreground text and also be able to read the "watermark". I understand that is probably more of a function of color selection....

What's the best way to extract table content from a group of HTML files?

After cleaning a folder full of HTML files with TIDY, how can the tables content be extracted for further processing? ...

Is there a way to make text unselectable on an html page?

I'm building an html UI with some text elements, such as tab names, which look bad when selected. Unfortunately, it's very easy for a user to double-click a tab name, which selects it by default in many browsers. I might be able to solve this with a javascript trick (I'd like to see those answers, too) -- but I'm really hoping there's ...

Must DOCTYPE be the very first tag in an HTML document

Our security manager (Tivoli Access Manager, TAM) dynamically inserts a bit of javascript at the top of every html page when requested. It is inserted above the DOCTYPE statement. I think this might be the cause of the layout problems I am having. Ideas anyone? ...

What would cause a visitor to return to the top of the previous page, instead of to the point in the page where the link resides?

I've seen this weird behavior on several sites recently: I scroll down a page and follow a link to another page. When I click the Back button and return, I am left back at the top of the previous page, not at the link. This is very annoying if I'm clicking on links in a search results page or a list of "10 Best Foo Bars...". See this pa...

Are there any noted differences in appearance rendering of html and xhtml in Google Chrome from other browsers?

Are there any noted differences in appearance rendering of html and xhtml in Google Chrome from Firefox? From IE? From other browsers/what browser does it render the code the most similar to? ...

Why don't self-closing script tags work?

What is the reason browsers do not correctly recognize: <script src="foobar.js" /> // self-closing script tag Only this is recognized: <script src="foobar.js"></script> Is it breaking concept of XHTML support? Note: This statement is correct at least for all IE(6-8 beta 2). ...

How to highlight source code in HTML?

I want to highlight C/C++/Java/C# etc source codes in my website. How can I do this? Is there a library I can use? Is it a CPU intensive job to highlight the source code? ...

When should you use standard html tags/inputs and when should you use the asp.net controls?

As I put together each asp.net page Its clear that most of the time I could use the standard html tags just as easily as the webforms controls. When this is the case what is the lure of the webforms controls? ...

What is a valid value for id attributes in html

When creating id attributes for html elements what rules are there for the value? ...

How do you grab a text from webpage (Java)?

I'm planning to write a simple J2SE application to aggregate information from multiple web sources. The most difficult part, I think, is extraction of meaningful information from web pages, if it isn't available as RSS or Atom feeds. For example, I might want to extract a list of questions from stackoverflow, but I absolutely don't need...

three column web design with variable sides

I've been trying to come up with a way to create a 3 column web design where the center column has a constant width and is always centered. The columns to the left and right are variable. This is trivial in tables, but not correct semantically. I haven't been able to get this working properly in all current browsers. Any tips on this...