Internet
Fact-checked

At EasyTechJunkie, we're committed to delivering accurate, trustworthy information. Our expert-authored content is rigorously fact-checked and sourced from credible authorities. Discover how we uphold the highest standards in providing you with reliable knowledge.

Learn more...

What Is HTML Picture Code?

Eugene P.
Eugene P.

In a HyperText Markup Language (HTML) document, HTML picture code is programming used to insert graphical images at different points in the layout. The code generally is a series of human-readable keywords that are then assigned associated values, wrapped between greater-than and less-than signs inside the HTML document. The resulting HTML picture code tells a web browser or other document viewer the location of the picture file online or on a disk drive, the dimensions of the picture, any special formatting the picture has, and different alignment options for the other elements in the HTML document that are surrounding it. Pictures can be nested inside other HTML codes — sometimes known as tags — allowing them to be used as clickable links, list items or background images. Through the use of the cascading style sheet (CSS) extensions in HTML, many other values and properties of a picture within a document also can be modified, while some programming languages can be embedded in the document to allow for basic image processing.

The most common HTML picture code consists of the image tag, which in HTML is represented by the keyword IMG. This tells the web browser that a picture is going to be inserted in the document at this point and that information about the image will follow. The only required information that must be inside the IMG tag is called the source. The keyword SRC is assigned the name or location of the picture file, allowing the browser to load the image. The value can either be a file name or an online address that also is known as a universal resource location (URL), much like a website address.

HTML picture code is written between greater than and less than signs.
HTML picture code is written between greater than and less than signs.

There are other properties that can be defined within an HTML picture code. The height and width of the image can be explicitly provided, allowing the image to be resized to fit within a certain layout. Alternate text can be supplied so users who cannot see the image can instead hear or read a text version of it. Borders and spacing around the image also can be set, giving the image a distinct appearance and placement in a web page.

HTML picture code is programming used to insert graphical images at different points in the layout.
HTML picture code is programming used to insert graphical images at different points in the layout.

A fair amount of HTML picture code can be used to define how the picture is aligned and how the rest of the web page reacts to its presence. Text can be set to flow around the image on the right or left sides, or it can be set to skip over the picture completely, leaving it unencumbered in its own space. Some options allow the picture to be drawn over by text or other elements, or even to flow as part of the layout so it will be included in a line, like any other letter in a sentence.

Discussion Comments

shikemenimp

Wow! This is very educational. I am very happy to be lucky to be part of wiseGEEK.

Post your comments
Login:
Forgot password?
Register:
    • HTML picture code is written between greater than and less than signs.
      By: Nikolai Sorokin
      HTML picture code is written between greater than and less than signs.
    • HTML picture code is programming used to insert graphical images at different points in the layout.
      By: spaxiax
      HTML picture code is programming used to insert graphical images at different points in the layout.