Skip to main content
Jhon Carlo
Inspiring
Dec 22, 2017 8:03 AM UTC
Question

How to format the html code

Is there a way to automatically format the html code in dreamweaver?

I mean, for example, select the code and automatically get the right alignment of the code like it is possible do in action script.

Is it possible?

Is there a keyboard shortcut?

Thanks.

    This topic is closed to new replies. Start a new post to keep the conversation going.

    15 replies

    Nancy OShea
    Community Expert
    Community Expert
    Dec 22, 2017 5:50 PM UTC

    From the Common Toolbar (shown below) select Apply Source Formatting.  However, you must Edit Tag Libraries 1st to set up your indenting preferences.   Personally, I don't like indented code.

    Translate
    Nancy O'Shea— Product User & Community Expert
    B i r n o u
    Legend
    Dec 22, 2017 6:00 PM UTC

    you're right, when code is indented it is too complex to read it, to clearly see the nested tags, having the starting/ending tag in a first view, well it is definitly better to have a one line code ... arf arf...

    Translate
    B i r n o u
    Legend
    Dec 22, 2017 8:08 AM UTC

    in fact there are differents current feature requests to polish and greatly improve the code formatting / coloring.

    you can still have a drop down menu Edit > Code that open a child menu to format and indent the code, AFAIK there is not shortcur for it ?

    Translate
    Jhon Carlo
    Inspiring
    Dec 22, 2017 8:16 AM UTC

    Thank you!

    Yes, but it does not work either with the mouse or with the keyboard.

    Translate
    B i r n o u
    Legend
    Dec 22, 2017 9:12 AM UTC

    I agree that it really need improvment, but at least for HTML, it is more or less indenting the tags correctly... can you post a screen grab ?

    Translate