copy and paste code from safari (chrome) web inspector - google-chrome

I want to copy some html code from the web inspector but am only able to copy one line at a time. Is there any way to select a block of elements or all elements?

If you right click on any element in the Web Inspector, then click "Copy as HTML" on the resulting pop-up menu, you can then paste the html for that element (and all enclosed elements) into your editor. You can get the entire document by doing this with the <html> element.

On the console, try document.documentElement.outerHTML.

You could view the html response from the Network section of Chrome

Related

How can I select the texts on this page?

I'm not sure if this is the right place to ask this. But how would one go about selecting text on this page (I'm trying to copy and paste to a dictionary online).
http://novel.naver.com/best/detail.nhn?novelId=189212&volumeNo=1
Thanks for any help.
You shuld find the node you need (paragraph with text) in the DOM tree and copy it. Use DOM inspector (ctrl+shift+K in Mozzila or `ctrl+shift+I in Chrome -> choose DOM inspector).
Using Chrome's web developer tools and Javascript turned off, simply right-click->Inspect element now in the Elements tab of the Inspector select the <head></head> tag and right-click->Delete Node, now the text will be highlight-able.

Copying HTML code in Google Chrome's inspect element

I have a website of which I want to copy an HTML code from - how do I copy all the text in inspect element - so I don't get the website's HTML code, but the code that I have already changed so that I don't have elements I don't want in my own webpage?
Do the following:
Select the top most element, you want to copy. (To copy all, select <html>)
Right click.
Select Edit as HTML
New sub-window opens up with the HTML text.
This is your chance. Press CTRL+A/CTRL+C and copy the entire text field to a different window.
it's the easiest way to do this.
Right click → copy → copy element
Select the <html> tag in Elements.
Do CTRL-C.
Check if there is only lefting <!DOCTYPE html> before the <html>.
Using HTTrack software you can download all the website content to your local directory.
HTTrack: http://www.httrack.com/
This is bit tricky
Now a days most of website new techniques to save websites from scraping
1st Technique
Ctrl+U this will show you Page Source
2nd Technique
This one is small hack if the website has ajax like functionality.
Just Hover the mouse key on inspect element untill whole screen becomes just right click then and copy element
That's it you are good to go.

How can I edit CSS on an HTML tab?

How can I edit the CSS directly on a tab which is displaying an HTML file? By clicking the "edit source" button, I can see the HTML, but not the CSS. Is there a way to see the CSS is a split panel view?
Great question. We're working on CSS/JS editing in the split panel view within Divshot and it should be available very soon. I'll update this post when it's released.
If you are trying to find the css file in your web browser then you can follow the below stapes-
In google chrome or mozilla firefox right click on the browser select inspect element -> inspector tab -> Rules -> edit the css value then you can see the changes css value is applied in your webpage.
Note:- It is applicable for tab, laptop, computer etc.

Getting the generated sourcecode of a page in notepad

Is there any way of getting the source code of an HTML browser-page that is showing when i click inspect element(in chrome of firefox) and put it in a notepad(automatically) or maybe accessing it automatically somehow.
I do not want the original sourcecode but the one that is generated after all the javascripts have already run.
I would like to use the code afterwards in another web page and parse it...
later edit: i can actually click the html in the inspect element and click copy html but i need for a nother site to automatically acces this information because i will try reloading the site at regular intervals and need to constantly get the new html
With Firebug's HTML tab, you can right click on the element, and click "Copy HTML".
See also this post:
how to get fully computed HTML (instead of source HTML)?
press ctrl+u then it will display source code of html page then go to file menu and save it as html file in your system. then you can open it in html or another editor like netbeans /dreamviewer/notepad. I suggest you to open it in netbeans or dreamviewer will be better then open it in notped.
thanks.
You can use the web developer plugin for Firefox or Chrome. It gives you the generated source of a page.
In Opera , Right Click -> click on Inspect Element -> right click on <html> tag -> click on Edit Markup, from there you can copy the entire HTML code.
Edit -> In Oprea, right click on the page -> click on Source -> a new tab opens , in the menu bar of newly opened tab you have option 'Save' , from that option you can save the html code as .html , .txt.
Hope this helps you.

Firebug source and Mozilla Source difference

I have PHP generated HTML.
Firebug shows me this source:
<div class="module-header"><div class="module-header2"><div class="module-header3"><h3 class="module-title" style="visibility: visible;"><span>Մարդկային</span> ռեսուրսներ</h3></div></div></div>
Mozilla Source shows me another HTML for that part.
<div class="module-header"><div class="module-header2"><div class="module-header3"><h3 class="module-title">Մարդկային ռեսուրսներ</h3></div></div></div>
Actually this part should work as link. But doesn't...
Firebug is showing you the actual page content at that exact moment, whereas "Show Source" is showing only the static HTML that got downloaded from the server.
If JavaScript is making any changes to the page, the two will be different. In this case, it looks like JavaScript is removing your link and hiding the h3 element.
I see a style="visibility: visible; in Firebug's source. Are you sure you are not messing with the HTML via Javascript and some .show() .hide()?
Firefox's Source is the way to go for static HTML -> There is no rendering difference from what you see in your browser window and the source you see with Right Mouse BUtton > View Source, but (there always is a but) if you change the source dynamically - e.g. via JS when hovering over one link it hides some other part of the website - the Firefox "View Source" will be wrong and not reflecting these dynamic changes - these you will only be able to see with Firebug.
Maybe you can try a different browser and see if it is working there as a link?
Javascript might interact with your page and could hide the link because of some pre-condition. Maybe you want to turn off Javascript and see if your link is working then?