Difference between HTML and Script in Firebug - html

I was going through a webpage and searched Google on how to find the page information.
I installed Firebug and there I found two things. The first is the HTML option and the second the Script option.
What is the difference between these two things? When I am looking at the page source it is exactly matching with the Script content shown in the Firebug. Then what is the code shown in the HTML option?

HTML Panel shows you the generated source of the page. This content can be different from what you see when you do a view source of the page. This pages shows you the DOM of the page. The Script Panel is something used to debug javaScript that generates the DOM. You can set break points and see the call stack on the right hand side pane of the Script panel. While as Right hand side panel of HTML block shows the CSS rules used to style DOM elements.

These "options" are actually called "panels".
The HTML panel allows you to inspect and change the HTML structure of the page. It is a live view of what is displayed on the page and provides you with different information related to the selected HTML element like applying CSS or its DOM properties. You can read more about the HTML panel here:
https://getfirebug.com/wiki/index.php/HTML_Panel
In contrary the code you get via the page's context menu option View Source is just a static view of the code when the page was requested from the server.
The Script panel is used for JavaScript debugging. It allows you to set breakpoints to stop the script execution at them. When the script is halted you can view the stack trace and the variables available in the current stack frame. You can read more about the Script panel here:
https://getfirebug.com/wiki/index.php/Script_Panel

Related

How to show completed html source on chrome?

I'm trying to take the full html source of the tab in
this page
I want to take the source of
this tab
But unfortunately, the html I'm getting is not completed.
I registered a gif to explain it better
That select list is showing just when I inspect the element, while If I just insect the element with the list closed, it doesn't return any list html.. is it created dinamically when the user click on it?
I've tried to expand all the codes, but unfortunately it seems the html of every list is not appearing.. It might be created just when I open the list?
Is there a way to get the lists html?
Hope I've been clear.
Not sure what you want to save, but by inspecting it sources, it seems that the website use the way of removing and appending the html source which means only you pressed the expanded button, Javascript will append it (different options) to the body, otherwise it will not shown in the element tab.
I don't think you could get all html tags in just 1 try because the website use Javascript to append the html and you can't see it in the element section in console when the element is being removed.
Example:
You can save the page if you want. Just save it with Ctrl+S and you will find the basic source in there along with the stylesheet and other scripts.

How to view HTML source without refreshing the page in Chrome

I need to view all source HTML in plain text in one place. I need it from an already loaded page. CTRL+U (View Source) refreshes the page. The page I'm trying to view can only be accessed via proper form submit. What I really want is for CTRL+U to not refresh the page.
I need the HTML source of an already loaded page added to my clipboard.
I think none of the other answers really answer your question.
You want the exact response from the server, not the current DOM, and you want it with the exact request headers that was sent the first time.
To do so, open the Chrome Dev Tools and select the "Network" tab.
The very first request should be the page you requested. Click it and select the tab "Response" on the right side to get the exact response the server gave you.
Right click-> inspect element anywhere you want to see the html, it still show the code of all the page ans you can modify the value of html/css directly in it.
The only answer is the one Dor1000 provided himself in a comment:
dev tools, elements tab, right click html tag, copy, copy outer html.
He wants the current HTML (after javascript or any other modifications, not the original source HTML).

How to edit WordPress page's html code

I can't get editable html code behind the page. I want to make some changes to the page. Web site is hosted in the remote server. Someone assigned this task. There is empty editor when open edit page as below image.
Also I added plugin and actived it but can't get the result.
The picture you posted is of the WYSIWYG editor, which is only for adding content to the page.
If you want to edit the layout of the page itself you have 2 options -
Minor page edits to appear across all pages on the site - Go to Appearance -> editor -> page.php and then edit the code to suite your needs.
Large page edits to appear on one or two pages -
Get access to the files
Duplicate page.php with a different name
Edit code
When you go to add a new page you should have an option to pick a page template. Choose the page template you just created.
If you know exactly what you are doing, you can use Chrome "Inspect" feature, and change the HTML of the content inside the WordPress WYSIWYG Editor. After injecting your HTML, click Preview or Publish and your changes will be saved correctly.
In WordPress 5.5.3, you should be able to click the three dots on the top right, then select Code editor. Alternatively, press Ctrl+Shift+Alt+M.

Why would HTML show up in view:source but not be displayed or rendered on the page?

What would cause an HTML table and form (viewable in view:source) not to render or appear on the page?
It also does not appear in Chrome's Developer Tools console or Firebug console.
I have been trying to figure this out all day and searching is not helping.
Any changes from the raw html you see in view source to the rendered DOM in the browser is caused by JavaScript.
There must be some code on that page that is removing your table.
Can you please provide some code examples of scripts that are on the page and that you are including?

html dynamic change - how view changed contents?

Javascript run at page opening or later by user action like clicking a button with javascript attached, can alter the page contents and for instance change the layout in the browser.
Using right-click "View Source" shows the original content, not the changed one.
But how/from where can one retrieve the new, changed page contents?
You could use Firebug to see the live contents of the DOM, or you could use Web Developer's view generated source feature.