/    Sign up×
Community /Pin to ProfileBookmark

Why is a html element shown BEFORE predecessor elements on webpage?

Lets have a look at an example webpage:

https://www.makeuseof.com/tag/lock-methods-android-phone/

Now right click (in Firefox) on the text (starting “You can secure your Android phone’s lock screen….”) below the headline and select “Inspect element” from context menu

The element has a class “heading_excerpt”.

Now have a look on the element(s) in HTML code just ABOVE this element. They have a class e.g. “heading_meta”.

Although they are physically written in HTML code ABOVE the “heading_excerpt” they are appear on the loaded webpage in the opposite order.

Why?

Is there a way to let the browsers rendering machine show them in the order they appear in HTML source code?

I have no access to the original web page server but may want to re-arrange it afterwards (from user script).

Peter

to post a comment
CSS

0Be the first to comment 😎

×

Success!

Help @pstein spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 4.23,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...