Showing pictures in the text?

  • Thread starter Desiree
  • Start date
In summary, adding pictures to text can be done using the <code>&lt;img&gt;</code> tag in HTML, which requires the "src" attribute for the image file and the "alt" attribute for alternative text. Pictures can also be resized using the "width" and "height" attributes, with percentage values recommended for responsiveness. The "align" attribute in the <code>&lt;img&gt;</code> tag can be used to align pictures, and captions can be added by wrapping the <code>&lt;img&gt;</code> tag inside a <code>&lt;figure&gt;</code> tag and using the <code>&lt;figcaption&gt;</code> tag. Additionally, links can be added to
  • #1
Desiree
22
0
Can someone please guide me on how to show an image or photo in the body of the text/posting and not as a highlighted attachment link? I have learned how to show Youtube videos but don't know what to do with pictures. Thanks.
 
Physics news on Phys.org
  • #2
Use [noparse][/noparse] tags, and put url of an image between them. You must have your pictures hosted at some external server, like tinypic, imageshack or something.

So [noparse]
tree.jpg
[/noparse]
will be rendered as

tree.jpg
 
  • #3
Thanks Borek.
 

1. How can I add pictures to my text?

Adding pictures to text can be done by using the <img> tag in HTML. This tag requires the "src" attribute, which specifies the image file to be displayed, and the "alt" attribute, which provides alternative text for the image.

2. Can I resize pictures in the text?

Yes, you can resize pictures in the text by using the "width" and "height" attributes in the <img> tag. It is recommended to use percentage values to ensure that the images are responsive and will adjust to different screen sizes.

3. How do I align pictures in the text?

Pictures can be aligned in the text by using the "align" attribute in the <img> tag. This attribute accepts values such as "left", "right", and "center" to specify the alignment of the image.

4. Is it possible to add a caption to pictures in the text?

Yes, you can add a caption to pictures in the text by wrapping the <img> tag inside a <figure> tag and using the <figcaption> tag to add the caption. This provides a semantic way to add captions to images.

5. Can I add links to pictures in the text?

Yes, you can add links to pictures in the text by wrapping the <img> tag inside an <a> tag and specifying the link in the "href" attribute. This will turn the image into a clickable link.

Similar threads

Replies
11
Views
459
  • Feedback and Announcements
Replies
19
Views
2K
Replies
2
Views
843
Replies
13
Views
2K
Replies
17
Views
1K
  • Feedback and Announcements
Replies
7
Views
974
  • Feedback and Announcements
Replies
3
Views
343
  • Feedback and Announcements
Replies
2
Views
981
  • Introductory Physics Homework Help
Replies
27
Views
417
  • Feedback and Announcements
Replies
6
Views
2K
Back
Top