can I use the html code highlighter from the browser to my website HTML code color "Inspect element" window code color without any plugins like codemirror?
Asked
Active
Viewed 210 times
1
-
And I havent left my own answer yet, because I just dont know, honestly. I understand what is being asked, and I dont its possible, but I just dont know for certain – Oberst Sep 30 '14 at 03:46
1 Answers
0
Yes: all browsers have some kind of inbuilt developers tools that let you inspect a website's HTML, CSS and other components. The shortcut and method for activating them is different for each, but all of them have a 'highlighter' that allows you to click an element on the page in order to inspect it.
Read more here on using developer tools in all broswers -> http://devtoolsecrets.com/
Chrome's developer tools are arguably the most widely known, commonly used and most powerful. Shortcut is SHIFT + CTRL + J.
edit: in light of the comments below, it looks like OP is after a specific feature of Codemirror that lets you highlight syntax. This is not possible natively in browser.

Ucinorn
- 648
- 7
- 21
-
1No. Codemirror runs on a webpage. OP is asking if there is a way to use the browser's API to natively highlight syntax on a page itself without a jquery/javascript plugin – Oberst Sep 30 '14 at 03:27
-
-
Added to the answer: all dev tools have a highlighter that lets you identify an element on the page. Perhaps it is not as robust as Codemirror's (particularly for hidden, floated or fixed elements) but it does work. http://stackoverflow.com/questions/12291138/how-do-you-inspect-the-web-inspector-in-chrome – Ucinorn Sep 30 '14 at 03:30
-
Open the console window then click on the 'elements' tab on the top left of the console. It will show the current HTML of the site, and hovering your mouse over elements will highlight that element on the page. – Ucinorn Sep 30 '14 at 03:35
-
-
No no. @TomMuller I dont think you are understanding the original question. CodeMirror is used for syntax highlighting within a div. Kind of like prettify. OP is probably looking for something similar. Not opening the dev tools, but instead using their APIs within a div that has markup/source in it (for example) – Oberst Sep 30 '14 at 03:44