WordPress.org

Support

Support » Plugins and Hacks » Making my own code tag?

Making my own code tag?

  • Suikolove

    @suikolove

    Is it possible for me to create an HTML tag called code2 which adds a border to the area and changes the background color? For example, the tutorials on my blog/site will have random snippets of code thrown in the sentences which uses the code tags, but I want the EXAMPLES of code I put up to be styled differently, since they’re much bigger than just a word thrown randomly into a sentence.

    For this, I don’t want the codes in the sentences to be affected by the border and the background color change.

    I hope I’ve explained well enough what I want to do.

    Thanks in advance for any help anyone can offer me.

Viewing 1 replies (of 1 total)
  • No, I don’t think you can make up your own html tag – that would be a chaos on the internet.

    However, you can define as many divs or spans in your stylesheet as many you want.

    Another option could be to use a code highlighting plugin as do many WP users who publish tutorials and also show code.

Viewing 1 replies (of 1 total)
  • The topic ‘Making my own code tag?’ is closed to new replies.
Skip to toolbar