Why View source of the page is different than Inspecting the element of the page [closed] - html

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Okay I'm using Producteev.com frequently on my projects, the other day I noticed that on my workspace page, that the source of the page (Ctrl+U) is quite short and most of the page's items are not in the view source code.
but of course if you inspect the elements of the page you see the actual codes.
I'm not sure if this is the right place to ask such question but I'd like to know why is this happening and using what technology maybe? and also why they do use such techniques?

Viewing the source shows the source code.
Inspecting the DOM shows you a serialisation of the current state of the DOM after the HTML has been parsed, error corrected, normalised and (possibly) manipulated with JavaScript.

DOM elements that have been added dynamically after the page is generated will not be included in the page source.

Related

Custom made HTML tags [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
Just came across a project that had custom-made tags.
Something like:
<buildings>
<building-1></building-1>
<building-2></building-2>
</buildings>
(This code doesn't do anything; it's an example)
(It's not mine) (https://codepen.io/perbyhring/pen/jpQwav) What is the use of this?
Those custom HTML elements have been introduced some time ago and should make HTML code more readable.
"Those elements provide a way to build own DOM elements but also have some drawbacks as simply defining and using an element called blue-button does not mean that the elements represent a button. Tools such as Web browsers, search engines, or accessibility technology will not automatically treat the resulting element as a button just based on its defined name."
Read more about them in the html standard.

Why does the page source of Facebook, unlike stack overflow, look the way it does? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
Below are examples of the page source from both sites. I am on chrome if that means anything. My Questions is, why do these two sites look so differently from each other? Why does Facebooks source look the way it does, paragraphs and paragraphs of code with no formatting compared to stack overflow where tags and elements are distinguishable from each other?
Does it serve a purpose for it to be shown the way it looks on facebooks website? I assume that's not how it was formatted in development but done that way after loading it to the site?
**Here is an example of Facebooks source code from the landing page**
**Here is an example of Stack Overflows source code from the landing page**
Not necessarily. Majority of the code is on the server side anyway so you can't see majority of the code for both websites. However, Facebook's code has been minified. This means the code has been scrunched together to take up less space so that the site will load faster.

How is web page changing within the same website done? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
For example, let's say we're at the homepage at www.fakewebsite.com and, when we look at the footer at the bottom of the page, we can see that there is an "About" button that you can click on--which you do so you get to know more about the company. The website refreshes and enters into www.fakewebsite.com/about. My question is this: How is this done? I'm pretty new to the web developing world and would like to know what is done to make this possible (So, I can do it too).
What you need is known as an anchor and does not require ajax. You should start by searching info on that.
It looks like this:
about
This is done via an anchor element where the files are linked via a path in the href of the tag for example:
About
More info here: anchor
You can also study this starting with HTML + CSS and this Getting started with HTML

Is there any way to get all of the css just from a single page? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I am wondering there is a tool such as a Google Chrome extension out there that will get all of the css displayed on the current page, and nothing else. For instance, when you use the developer tools in chrome and get the css you have the option to get the classes you hover over and it's neighbouring classes, or the ability to see the full CSS file for the whole site. I am looking for a way to get ALL of the css used on the current page and displayed all together, instead of me having to manually check each div and pasting it into notepad.
I figure there must be something out there that does this. Any help is appreciated.
I haven't tried these myself, but Pendule and Quick Source Viewer look promising.
I would just post this as a comment but I don't have enough rep. :(

How to parse the DOM of a page on another domain [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I've been having a lot of trouble parsing the DOM of a remote webpage using AJAX. I don't seem to be able to find any example or tutorials demonstrating this procedure.
I basically want to search through the DOM of a remote page, find a tag with a specific id/class, take the inner contents of that tag and print it out on my own page.
If anyone can help i'd appreciate it.
The same-origin-policy browsers have do not allow you to access external pages for security reasons. You need to use e.g. a PHP script on your server to retrieve the external site's HTML. Then you can make an AJAX call to that script instead.
You could always use this: http://simplehtmldom.sourceforge.net
Easy to use.