I'm trying to look at a html file and remove all the tags from it so that only the text is left but I'm having a problem with my regex. This is what I have so far.
import urllib.request, re
def test(url):
html = str(urllib.request.urlopen(url).read())
print(re.findall('<[\w\/\.\w]*>',html))
The html is a simple page with a few links a...
Hi,
Might be a silly question, just wanted to know do the following ways on including CSS have any impact on the server response time. If yes, which is the better method and how
Way 1 :
<link rel='stylesheet' href='css/some.css'/>
Way 2 :
<link rel='stylesheet' href='http://www.somesite.com/css/some.css'/>
...
Suppose I have this HTML structure:
<div class="a">
<div class="floated-left">...</div>
<div class="floated-left">...</div>
</div>
I have noticed that if I don't set overflow:hidden to .a, then the <div class="a"> does not occupy any vertical size. For example, if I set its background to red, it is not visible at all. Inspecting it ...
Could anyone explain when should the floated elements get cleared?
I have noticed sometimes when I make something in HTML, and I don't clear them, it still all looks good!
Also can overflow:hidden be used as a replacement for clearing?
Look at this example:
<html>
<head>
<style>
.a { background-color: red; overflow: hidden }
...
i wanted to create a web server while on the process.....
i am not being able to create a dynamic html which could take link from my c# console application...
for example i have a code which shows files from the system.. for example "c:\tike\a.jpeg" now i wanted to make that particular link a a href link in my html page...
any help w...
I have an AIR application that uses the HTML component to display a significant portion of content (I set the html myself, it is not loaded remotely). The text displays normally on Mac (I think Mac antialiases all text by default). However, on windows, the text displays anti-aliased regardless of the OS settings. It ends up giving eve...
Basically I'm trying to scrape a few divs out of several of the intranet sites at work. and include them on a page I run locally (so I can look at one page instead of having 5 open). I'm guessing this is possible with JavaScript but I'm primitive with JavaScript so I'm not sure what I need to search for to find the answers. After I scrap...
So what I'm trying to do is select all the distinct months from my database and then print them in a list. That, I can accomplish. The problem lies in the fact that I need my list to be two column. The way that I achieve this with CSS is by using 2 different div's "left" and "right" which are floated next to each other. This poses a prob...
I'm just starting to playing around on a Mac for the first time and have created a very simple html page that uses jQuery to do a simple text swap when an h1 tag is clicked.
When I don't view the page through the webserver and just open it directly in Safari (file:///Applications/xampp/xamppfiles/htdocs/test/mypage.html) it works as ex...
I was asked to assist with troubleshooting a problem. Functionality on a site "stopped working" and I was asked to figure out what is wrong. The following is the error:
FrontPage Error.
User: please report details to this site's webmaster.
Webmaster: please see the server's application event log for more details.
On th...
I am embedding a movie in a web page with the embed tag, but I would like to interact and be interacted via javascript with the embedded movie in .mov. In particular, I would like to get the timings so I can perform actions on the web pages when a particular moment in the movie is reached (like adding subtitles or karaoke effects in the ...
What it does? is there any pros to add this in for all browser?
...
I'm working on an English/Thai phrase app. In addition to displaying both English and Thai text, I need to display Phonetic text. The Phonetic text is English characters with arrows indicating inflection above the syllables. Example:
knuckles
↘ ↑
kaw-new
In that example, the falling arrow should be centered above "kaw" and th...
How to show a message only if cookies are disabled in browser? like http://stackoverflow.com show if JavaScript is disabled.
...
I would like my Delphi program to send email message via Outlook which will contain table (like the ones in Excel). I know how to send emails using Outlook through Delphi, but do not know how to include tables in it. I guess this should be something related to html code inside email body, but do not know exactly. Can anybody help?
...
Hi all!
I have a UIWebView that loads a local HTML file from the resources folder.
Now, this HTML file has Javascript inside it.
My question is, is there a way to pass an XCode variable to the HTML file that gets loaded inside the UIWebView which I can pass to the Javascript function in the HTML.
Thanks a lot for any help or suggestio...
My page looks good without zooming. but when i zooming in firefox and in IE, it looks ugly because some of the contents wraps down in to next line.
I think that the problem is in unit i am using. I am using pixels for setting the width.
What units I should use to prevent ugly look of pages while zooming?? Plz help
...
By "web UI developer", I mean someone whose primary job is to craft pages using HTML, CSS and JavaScript. They should probably be able to learn enough PHP or Rails or something to get by when creating pages that draw their information from a more sophisticated back-end, e.g.,
<div>Your <?=$subscription['title']?> Subscription</div>
Th...
I am almost obsessed with perfect indentation and alignment when writing code, but for some reason I don't feel comfortable indenting HTML markup. Maybe because some times the level of indentation gets too deep, but I usually just (ab)use VIM's folding feature. Is this considered bad practice? What's your style with markup indentation?
...
Is there a way to make an html page from the contents() object??
for example iterate over $('body').contents() object and make a output like this:
<body>
<div>text<a href=#></a></div>
<p>%^$$</p>
....
</body>
thanks!!! and sorry for the english!
...