Jump to content
Killersites Forums

HTML, CSS, Javascript, PHP, etc.


Recommended Posts

I'm a fair way into the HTML 2015 course, and, maybe you will answer the question later on in the course, but, how does the browser know how to implement the different web page design languages, such as HTML 5, CSS, JavaScript, PHP?

I was amazed that you can just type a CSS keyword "style" into an HTML 5 webpage script, and the browser automatically implements it.

I'm old enough to know that I don't have to know all the gory details of how something works, in order to use and enjoy that it does, but, still, the "need to nerd" in me, would like to know.

My guess is that browsers need to be updated for the latest and greatest web design languages as they are created?


Link to comment
Share on other sites


For HTML, CSS and JavaScript, the web browsers 'know' what to do because the code has a particular structure that tells the web browser what kind of code it is. For example, with HTML, the tag structure with the angled brackets tell the browser it is HTML. For CSS, it can see CSS with the style attribute or the CSS tag block. With JavaScript, it is the script tag block. 

With PHP, you have to create a PHP page (ex: index.php) ... and when the web server see's the PHP extension, it passes the page to the PHP engine, and it knows how to find and read the PHP code. 

Makes sense?


  • Like 1
Link to comment
Share on other sites

In a very general sense, it answers my question.  It's obvious to me how the browser knows how to distinguish the three types of code, my question has more to do with the inner workings of browsers.

Maybe I'm overthinking, unnecessarily, the issue.

It seems to me, that in order for the browser to implement all three separate web page design languages, it has to act as a compiler that can compile three different computer languages.   Well, I guess part of the answer is that it's not a compiler, it's an interpreter.  And, I've actually read of scripting another programming language to perform functions from inside another programming languages code.  For example, scripting Python inside C++ code.

I'm rambling at this point, but, I was just curious about browsers conceptually.  It seems to me, that they must be updated and patched every time another code is developed to program web pages.


Link to comment
Share on other sites

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...