Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Html Translation


  • Please log in to reply
6 replies to this topic

#1 zcrane

zcrane

  • Members
  • 53 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:11:05 PM

Posted 07 September 2008 - 01:43 PM

Hey all... I'm wondering how HTML tags get translated into machine code, or do they even get translated? How does the browser know what the tags mean?

I know this is a bit abstract, but any help would be greatly appreciated.

Thanks!

BC AdBot (Login to Remove)

 


#2 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:10:05 PM

Posted 07 September 2008 - 05:03 PM

All computer programs are translated into binary, since that is the only languages that computers really understand. The browser knows what the tags mean because the developers tell the browser what they mean. When the browser gets the raw html, it is run through a parsing process that eventually translates the html into something that the computer knows how to use.

#3 zcrane

zcrane
  • Topic Starter

  • Members
  • 53 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:11:05 PM

Posted 07 September 2008 - 05:06 PM

So the does the browser parse the tags and then convert them to binary, or does creating the .html file convert the tags to binary, for the browser to parse out upon execution?

#4 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:10:05 PM

Posted 07 September 2008 - 05:20 PM

My best guess would be neither. I would suspect that the browser would use an interpreter of some sort, and pass that on to a compiler/linker, which would then convert it to binary. I don't know for sure though. Maybe you should check out the developer's documents for various browsers and see what you find. :thumbsup:

#5 zcrane

zcrane
  • Topic Starter

  • Members
  • 53 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:11:05 PM

Posted 07 September 2008 - 05:21 PM

Alright. Thanks for the info... sounds like it's a good start!

#6 Billy O'Neal

Billy O'Neal

    Visual C++ STL Maintainer


  • Malware Response Team
  • 12,304 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Redmond, Washington
  • Local time:09:05 PM

Posted 07 September 2008 - 07:10 PM

You can, of course, download the complete source code for Firefox here:
http://developer.mozilla.org/en/Mozilla_So...ode_(HTTP//FTP)

Pretty sure that's a little more in depth than you want, but just throwing it out there ;)

Billy3
Twitter - My statements do not establish the official position of Microsoft Corporation, and are my own personal opinion. (But you already knew that, right?)
Posted Image

#7 Alan-LB

Alan-LB

  • Members
  • 71 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Junee, NSW, Australia
  • Local time:03:05 PM

Posted 08 September 2008 - 10:15 PM

When you download a web page it consists of text, pics, HTML and possibly other components. HTML is parsed as Groovicus said and the information is used to position and modify the various components - text, pics and so on.

So there are tags to position text maybe in columns or tables. Tags for changing the font and font size and style (Bold, Italic or normal), and colour of the text. Tags will also indicate the position and size of any pics that have been downloaded as part of the web page.

Tags will also be used to set up links and their corresponding text - eg they would associate the link "www.bleepingcomputer.com" with a text saying "The Best Forum" :thumbsup:

If you can imagine that you are the editor of a newspaper and you have to give the printer written instructions as to how you want the front page to be laid out for printing - the text, the photographs, the ads and so on - then you would be doing what HTML (the editor's instructions) does for the browser (the printer).

Of course the HTML is written by the creator of the web page in the first page.

The analogy is not exact but I hope it helps.

Alan.
There are 10 types of people - those who understand binary and those who don't!!

Today is the Beta version of Tomorrow!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users